I registered in the manifesto android:theme="@android:style/Theme.NoTitleBar.Fullscreen" to be full screen, and it hides the TitleBar, but not the bar where Home, Back, etc.

enter image description here

Here is the manifest itself:

 <activity android:name=".ui.MainActivity" android:configChanges="orientation|screenSize|keyboardHidden" android:launchMode="singleTop" android:screenOrientation="landscape" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:windowSoftInputMode="stateAlwaysHidden"> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> </activity> 

I tried all the FullScreen styles, it does not help, tell me please, how can I hide everything like youtube.?

    1 answer 1

    For different versions of Android, this is done differently. Here is an example of the method that you need to call to hide the buttons, taking into account that the program will run on different versions of the OS.

     public void MakeItFullscreen() { if(Build.VERSION.SDK_INT > 11 && Build.VERSION.SDK_INT < 19) { // lower api View v = this.getWindow().getDecorView(); v.setSystemUiVisibility(View.GONE); } else if(Build.VERSION.SDK_INT >= 19) { View decorView = getWindow().getDecorView(); int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY; decorView.setSystemUiVisibility(uiOptions); } } 
    • It worked. One question: do you need to call this in each Activity? - DevOma
    • @TITAN yes, you can make this method static and call it from the main activation in the OnCreate method. Or maybe you can write something like in the manifesto: android:theme="@android:style/Theme.NoTitleBar.Fullscreen" - Andrew Romanenko