ImmersiveUI helps to hide StatusBar, hide NavigationBar, make StatusBar transparent, make NavigationBar transparent, and offers a REAL full screen experence.
Stop 1. Add it in your root build.gradle at the end of repositories:
in gradle:
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
or in maven:
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Step 2. Add the dependency
dependencies {
compile 'com.github.panespanes:ImmersiveUI:-SNAPSHOT'
}
just one line:
ImmersiveUI.immersive(activity);
add this after setContent(res); in your activity.
Now the activity looks like this:
you can also separately modify the StatusBar:
or separately modify NavigationBar:
and make a full screen experience:
Finally, if you want to go back to system default UI, just do like this:
ImmersiveUI.quit(activity);
creat your Immersive UI right now !