How To Show Content Behind Navigation Bar In Android?
Many time you need to show your app content behind the navigation bar , so your app content does not resize as navigation hide or show.
It is very easy to show content behind navigation in Android 4.1 and higher. you only need to set SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION flag and you should also set SYSTEM_UI_FLAG_LAYOUT_STABLE flag it helps app to maintain stable layout.
Figure 1. Transparent Navigation Bar
As shown in following code snipped.
When you use this approach it may be possible some part of your UI covered with system bars.so be careful and apply proper padding to layout so your UI components not covered by system bars.
No comments:
Post a Comment