setSystemUiVisibility method and getSystemUiVisibility method

The two methods are called as follows:

getActivity().getWindow().getDecorView().setSystemUiVisibility;

getActivity().getWindow().getDecorView().getSystemUiVisibility;

 

References:

http://blog.csdn.net/stevenhu_223/article/details/12428591

http://stackoverflow.com/questions/14178237/setsystemuivisibilitysystem-ui-flag-layout-hide-navigation-does-not-work

http://www.360doc.com/content/15/0204/18/20385871_446270224.shtml

 

The arguments that can be passed in to the setSystemUiVisibility(int visibility) method are:

    1. View.SYSTEM_UI_FLAG_VISIBLE: Display the status bar, and the Activity is not displayed in full screen (revert to the normal state with a status bar).

    2. View.INVISIBLE: Hide the status bar, and the Activity will stretch to full screen display.

    3. View.SYSTEM_UI_FLAG_FULLSCREEN: Activity is displayed in full screen, and the status bar is hidden and covered.

    4. View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN: The Activity is displayed in full screen, but the status bar will not be hidden and covered, the status bar is still visible, and the top layout of the Activity will be covered by the status.

    5. View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION:效果同View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN

    6. View.SYSTEM_UI_LAYOUT_FLAGS: The effect is the same as View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN

    7. View.SYSTEM_UI_FLAG_HIDE_NAVIGATION: Hide virtual keys (navigation bar). Some phones use virtual buttons instead of physical buttons.

    8. View.SYSTEM_UI_FLAG_LOW_PROFILE: The status bar display is in a low energy display state (low profile mode), and some icons on the status bar display will be hidden.

  

The new features of Android 4.4 add the following two:

View.SYSTEM_UI_FLAG_IMMERSIVE
View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY

Android 4.4 new feature to open full screen immersive mode

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325343424&siteId=291194637