Java Code Examples for android.view.View#getWindowSystemUiVisibility()

The following examples show how to use android.view.View#getWindowSystemUiVisibility() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DUtils.java    From UTubeTV with The Unlicense 5 votes vote down vote up
public static String systemUIVisibilityString(View theView) {
  int crap = theView.getWindowSystemUiVisibility();

  int duhs[] = {View.SYSTEM_UI_FLAG_LOW_PROFILE, View.SYSTEM_UI_FLAG_HIDE_NAVIGATION, View.SYSTEM_UI_FLAG_FULLSCREEN, View.SYSTEM_UI_FLAG_LAYOUT_STABLE, View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION, View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN, View.SYSTEM_UI_FLAG_IMMERSIVE, View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY};
  String result = "OK: 0";

  for (int duh : duhs) {
    if ((crap & duh) == duh) {
      switch (duh) {
        case View.SYSTEM_UI_FLAG_LOW_PROFILE:
          result += " | SYSTEM_UI_FLAG_LOW_PROFILE";
          break;
        case View.SYSTEM_UI_FLAG_HIDE_NAVIGATION:
          result += " | SYSTEM_UI_FLAG_HIDE_NAVIGATION";
          break;
        case View.SYSTEM_UI_FLAG_FULLSCREEN:
          result += " | SYSTEM_UI_FLAG_FULLSCREEN";
          break;
        case View.SYSTEM_UI_FLAG_LAYOUT_STABLE:
          result += " | SYSTEM_UI_FLAG_LAYOUT_STABLE";
          break;
        case View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION:
          result += " | SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION";
          break;
        case View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN:
          result += " | SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN";
          break;
        case View.SYSTEM_UI_FLAG_IMMERSIVE:
          result += " | SYSTEM_UI_FLAG_IMMERSIVE";
          break;
        case View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY:
          result += " | SYSTEM_UI_FLAG_IMMERSIVE_STICKY";
          break;
      }
    }
  }

  return result;
}
 
Example 2
Source File: ViewCompatJellybeanMr1.java    From letv with Apache License 2.0 4 votes vote down vote up
public static int getWindowSystemUiVisibility(View view) {
    return view.getWindowSystemUiVisibility();
}
 
Example 3
Source File: ViewCompatJellybeanMr1.java    From adt-leanback-support with Apache License 2.0 4 votes vote down vote up
public static int getWindowSystemUiVisibility(View view) {
    return view.getWindowSystemUiVisibility();
}