How can I hide the status bar for a specific activity?
I found this similar question, but none of the answers worked for me. The app just crashed every time I tried to go to the activity: How to hide status bar in Android
Thanks.
With a stock Android phone, press and hold Settings until System Settings appears. Select System UI Tuner > Status Bar, and turn off all the options.
This lesson describes how to hide the status bar on different versions of Android. Hiding the status bar (and optionally, the navigation bar) lets the content use more of the display space, thereby providing a more immersive user experience. Figure 1 shows an app with a visible status bar: Figure 1. Visible status bar.
Try this in you activity before setting your content
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With