Can't Hide menuBar on Android
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Can't Hide menuBar on Android
I'm trying to hide the menu bar on an Android tablet. It works ok on my pc but not on the Android tablet. I've put
hide menuBar and hide taskbar on openstack and on opencard but have had no luck. When I start Angry birds on the same Android tablet the menubar disappears. Thanks Joe
hide menuBar and hide taskbar on openstack and on opencard but have had no luck. When I start Angry birds on the same Android tablet the menubar disappears. Thanks Joe
-
- VIP Livecode Opensource Backer
- Posts: 7228
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Can't Hide menuBar on Android
You need to use the mobile version of the command. See the dictionary for mobileHideStatusBar and mobileShowStatusBar.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Can't Hide menuBar on Android
Hello Jacqueline,
I did try inserting mobileHideStatusBar but I get an error message "Can't find handler" when I run the program.
Is there something else I need to add to the code. Thanks - Joe
I did try inserting mobileHideStatusBar but I get an error message "Can't find handler" when I run the program.
Is there something else I need to add to the code. Thanks - Joe
-
- VIP Livecode Opensource Backer
- Posts: 7228
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Can't Hide menuBar on Android
It's a mobile-only command, so it will only work on a device or in the emulator. For desktop and IDE, you need to use "hide menubar". There are lots of mobile-only commands in the dictionary so you have to keep an eye on the platform support icons to know what works where.
For this kind of thing, you need to test the environment before executing the code. Or you can branch depending on the environment, like this:
For this kind of thing, you need to test the environment before executing the code. Or you can branch depending on the environment, like this:
Code: Select all
if the environment is "mobile" then
mobileHideStatusBar
else
hide menubar
end if
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Can't Hide menuBar on Android
The below code worked great. Thank you Jacqueline for providing the code. I know I will use this for all the other mobile-only commands. This will keep my app from giving me a handler error message when it includes a mobile-only command and I test/run my program on my pc. Thank you to Karthik for also informing me that the status bar can be hidden by selecting the status bar hidden option on the Android Stand Alone Application Settings. Joe Kotlinski
if the environment is "mobile" then
mobileHideStatusBar else hide menubar
end if
if the environment is "mobile" then
mobileHideStatusBar else hide menubar
end if
-
- Posts: 16
- Joined: Fri Jun 29, 2012 8:05 am
Re: Can't Hide menuBar on Android
There seems to be no way of hiding it completely unless you have a rooted device.
However, you can dim it. Making them sort of invisible, instead you see the dots. Using LIGHTS_OUT
View v = findViewById(R.id.view_id);
v.setSystemUiVisibility(View.STATUS_BAR_HIDDEN);
However, you can dim it. Making them sort of invisible, instead you see the dots. Using LIGHTS_OUT
View v = findViewById(R.id.view_id);
v.setSystemUiVisibility(View.STATUS_BAR_HIDDEN);