Hide or show the status bar on Android

8 replies [Last post]
jasonshow
User offline. Last seen 2 years 9 weeks ago. Offline
Joined: 19 Jan 2011

How can I hide or show the status bar on Android ?

thanks.

Replies

jasonshow
User offline. Last seen 2 years 9 weeks ago. Offline
Joined: 19 Jan 2011

hi~

I need to see the status bar,how can I do ?

thanks a lot !!

peach pellen
User offline. Last seen 1 year 45 weeks ago. Offline
Alumni
Joined: 12 Apr 2011

Hey Jason,

Sorry this wasn't answered sooner, I think it may have been buried!

First up, you should try to post Android questions in the Android section ;) (Works much better!)

Second up, an answer!

It's the exact same as iOS;

display.setStatusBar(display.HiddenStatusBar)

Peach :)

jasonshow
User offline. Last seen 2 years 9 weeks ago. Offline
Joined: 19 Jan 2011

hi, peach,

display.setStatusBar(display.HiddenStatusBar)

that will hide the status bar.

I need to see the bar.

I try all paras of setStatusBar,but not work.

display.DefaultStatusBar
display.TranslucentStatusBar
display.DarkStatusBar

can you tell me how to show the status bar on android ?

thanks.

Joshua Quick
User offline. Last seen 10 hours 29 min ago. Offline
Staff
Joined: 31 Jan 2011

Jason,

We "just" added display.setStatusBar() support to Android in build 633, which will be made available soon. Android only supports one kind of statusbar meaning "default", "translucent", and "dark" all show the same kind of statusbar on Android.

dax trajero
User offline. Last seen 1 day 19 hours ago. Offline
Joined: 13 Oct 2011

is display.setStatusBar(display.HiddenStatusBar) still not working on Android v3+

noticed it in the docs

only want to use it if its consistent across all Android versions?

Joshua Quick
User offline. Last seen 10 hours 29 min ago. Offline
Staff
Joined: 31 Jan 2011

dax,

Android 3.x does not have a status bar. The bar at the bottom of screen is what they call a "system bar" on Android 3.x and as far as I know, there is no way to get rid of it on 3.x. You can put it into "lights out" mode where it hides the buttons, but the black bar will still be there eating up screen space. That said, it looks like Android 4.x (API Level 14) added the ability to remove the system bar. See the following Android documentation for more details via the link below.

http://developer.android.com/reference/android/view/View.html#SYSTEM_UI_FLAG_HIDE_NAVIGATION

Bottom line, its not a bug. It's an Android limitation that we're stuck with.

rauls4
User offline. Last seen 2 weeks 6 days ago. Offline
Joined: 28 Apr 2010

Joshua,

How can I invoke the lights out mode? I am building an app for a gallery floor and it cannot have any system buttons.

Thanks!

Joshua Quick
User offline. Last seen 10 hours 29 min ago. Offline
Staff
Joined: 31 Jan 2011

Corona does not support "lights out mode". We can add it as a feature request though. That said, my understanding is that lights out mode does not hide the buttons; it dims them... which I suppose would be perfect for a media/gallery app like yours.

Viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.