Android full screen mode without battery icon
I am developing an Android application that contains a full screen activity, but I cannot hide the default Android icons and time, etc. from the screen
For example: -
I think this is something of an android impressive full screen view.
So can someone tell me how I can achieve this?
+3
source to share
2 answers
you can do it in java file
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.main);
or in AndroidManifest.xml
<activity android:name=".ActivityName"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"/>
With transparent notification bar, read this link .
+3
source to share
There is a new feature called Immersive FullScreen mode where all UI elements other than your activity are hidden. They can be returned by sliding down. To do this, use the following code:
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN|View.SYSTEM_UI_FLAG_HIDE_NAVIGATION|View.SYSTEM_UI_FLAG_IMMERSIVE|View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
0
source to share