Skip to content

Repository files navigation

VeryFullScreen

<?xml version="1.0" encoding="utf-8"?>
<manifest>
<application>
<activityandroid:name=".SplashScreenActivity"android:theme="@style/Theme.VeryFullScreen.Splash">
</activity>
</application>
</manifest>
<!-- Base application theme. -->
<stylename="Theme.VeryFullScreen"parent="Theme.MaterialComponents.Light.NoActionBar">
</style>
<stylename="Theme.VeryFullScreen.Splash"parent="Theme.MaterialComponents.Light.NoActionBar">
<itemname="android:statusBarColor">@color/purple_500</item>
<itemname="colorPrimary">@android:color/white</item>
<itemname="colorPrimaryVariant">@android:color/white</item>
<itemname="colorOnPrimary">@android:color/white</item>
<itemname="colorSecondary">@android:color/white</item>
<itemname="colorSecondaryVariant">@android:color/white</item>
<itemname="colorOnSecondary">@android:color/white</item>
<itemname="android:fitsSystemWindows">false</item>
</style>
publicclassSplashScreenActivityextendsAppCompatActivity {
@OverrideprotectedvoidonCreate(BundlesavedInstanceState) {
super.onCreate(savedInstanceState);
setFullScreen();
setContentView(R.layout.activity_splash_screen);
}
privatevoidsetFullScreen() {
intdecore = View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
| View.SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN// Hide the nav bar and status bar
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
//enable this tho maker icon status bar become blackdecore+= View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;
}
getWindow().getDecorView().setSystemUiVisibility(decore);
}
}

<?xml version="1.0" encoding="utf-8"?>
<manifest>
<application>
<activityandroid:name=".SplashScreenActivity2"android:theme="@style/Theme.VeryFullScreen.Splash2">
</activity>
</application>
</manifest>
<!-- Base application theme. -->
<stylename="Theme.VeryFullScreen"parent="Theme.MaterialComponents.Light.NoActionBar">
</style>
<stylename="Theme.VeryFullScreen.Splash2"parent="Theme.MaterialComponents.Light.NoActionBar">
<itemname="android:statusBarColor">@android:color/white</item>
<itemname="colorPrimary">@android:color/white</item>
<itemname="colorPrimaryVariant">@android:color/white</item>
<itemname="colorOnPrimary">@android:color/white</item>
<itemname="colorSecondary">@android:color/white</item>
<itemname="colorSecondaryVariant">@android:color/white</item>
<itemname="colorOnSecondary">@android:color/white</item>
<itemname="android:fitsSystemWindows">false</item>
</style>
publicclassSplashScreenActivity2extendsAppCompatActivity {
@OverrideprotectedvoidonCreate(BundlesavedInstanceState) {
super.onCreate(savedInstanceState);
setFullScreen();
setContentView(R.layout.activity_splash_screen2);
}
privatevoidsetFullScreen() {
intdecore = View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
| View.SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN// Hide the nav bar and status bar
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
getWindow().getDecorView().setSystemUiVisibility(decore);
}
}

Copyright 2020 M. Fadli Zein

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages