It is possible to hide the bar with the clock completely ? I mean complete full screen. I tried to use the IMMERSIVE_STICKY flag with the onWindowFocusChanged()
method but the bar pulls down when I touch the edge of the screen.
Best regard
It is possible to hide the bar with the clock completely ? I mean complete full screen. I tried to use the IMMERSIVE_STICKY flag with the onWindowFocusChanged()
method but the bar pulls down when I touch the edge of the screen.
Best regard
You can set the style of the activity on the application tag of the manifest
<application
...
android:theme="@android:style/Theme.Holo.NoActionBar.Fullscreen" >
...
</application>
You can also do it programmatically by setting the WindowManager flags to your activity at runtime (as Anas Mehar answered)
class MainActivity : Activity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
// If the Android version is lower than Jellybean, use this call to hide
// the status bar.
if (Build.VERSION.SDK_INT < 16) {
window.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN)
}
setContentView(R.layout.activity_main)
}
...
}
Source: https://developer.android.com/training/system-ui/status