Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide status bar?

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.

like image 796
user5495265 Avatar asked Nov 14 '15 06:11

user5495265


People also ask

How can I hide my status bar icon in Android?

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.

What hide status bar means?

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.


1 Answers

Try this in you activity before setting your content

getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
like image 79
Zubair Akber Avatar answered Sep 20 '22 19:09

Zubair Akber