Android 4.0 is a solution for setting up full screen modifications

  • 2020-05-10 18:50:10
  • OfStack

Recently, I was making an application for a tablet. After setting the BACK HOME at the bottom and the STATUS_BAR at the battery WIFI in full screen, I couldn't get it off. After looking up the information, I found a better way
Method 1 (program code) :
Add 1 line in OnCreate

getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE);  

Before setContentView.
1 out-of-date method:

getWindow().getDecorView().setSystemUiVisibility(View.STATUS_BAR_HIDDEN);  

Maybe some people's 4.0API is not quite like 1, so it is ok to do so

getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_SHOW_FULLSCREEN);

Use this on your phone:

getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);  

This is the way the code works, but there are still problems, because the source code has this 1 sentence

* There is a limitation: because navigation controls are so important, the least user  
* interaction will cause them to reappear immediately.  

Which means it's important and it's still coming! I tried it once and found that when popupwindow and Dialog pop up, the black bar below will reproduce.
The second way is described below, now the tablet root, and then change the two files

$ adb remount  
$ adb shell mv /system/app/SystemUI.odex /system/app/SystemUI.odexold  
$ adb shell mv /system/app/SystemUI.apk /system/app/SystemUI.apkold  
$ adb reboot  

Or you can go to the next RE file manager, rename the two files, and restart them so that you don't have status bar in any program, including standby!

Related articles: