SoFunction
Updated on 2025-04-09

Android 4.4.2 How to apply hidden status bar and bottom virtual keys in horizontal screen

//Go to titlerequestWindowFeature(Window.FEATURE_NO_TITLE); 
//Hide status bargetWindow().setFlags(.FLAG_FULLSCREEN,.FLAG_FULLSCREEN); 
//Hide the buttongetWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);

  setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
  View decorView = getWindow().getDecorView();
  (View.SYSTEM_UI_FLAG_LAYOUT_STABLE
      | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
      | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
      | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
      | View.SYSTEM_UI_FLAG_FULLSCREEN
      | View.SYSTEM_UI_FLAG_IMMERSIVE);

Notice:This method can only temporarily hide the status bar and the bottom virtual parts. When the application interacts, the bottom virtual key will pop up to cover the bottom of the full screen application. At this time, you can add it to the outermost layout of the Active base class layout fileandroid:fitsSystemWindows=”true”In this way, when interaction occurs, the virtual key at the bottom will not overwrite the current application.

The above is the method of hiding the status bar and the bottom virtual keys of Android 4.4.2 horizontal screen application that the editor introduced to you. I hope it will be helpful to you. If you have any questions, please leave me a message. The editor will reply to you in time!