Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

How can I remove the android software navigation button.
Started by mohammadalshwaf Aug 06 2018 08:23 AM

4 replies to this topic

Best Answer ldurniat , 06 August 2018 - 10:33 AM

Hi mohammadalshwaf,

 

Use code below from Sticker-Knight-Platformer/main.lua

-- Removes status bar on iOS
-- https://docs.coronalabs.com/api/library/display/setStatusBar.html
display.setStatusBar( display.HiddenStatusBar ) 


-- Removes bottom bar on Android 
if system.getInfo( "androidApiLevel" ) and system.getInfo( "androidApiLevel" ) < 19 then
    native.setProperty( "androidSystemUiVisibility", "lowProfile" )
else
    native.setProperty( "androidSystemUiVisibility", "immersiveSticky" ) 
end

From Post Is it possible to hide the Android navigation bar (the one with the home and back buttons) in Corona SDK?

@Rob Miracle: Do you want to hide the navbar for the entire app?  Then put them at the top of your main.lua. If you only want to hide them during your scene, then put them in scene:show() to hide them and turn them back on again in scene:hide().

 

Read more:

 

Have a nice day:)

 

ldurniat

[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

mohammadalshwaf

[GLOBAL: userInfoPane.html]
mohammadalshwaf
  • Observer

  • 5 posts
  • Corona SDK

Hi,

As you know with Android, there are the navigation buttons at the bottom of the screen. 

How can I hide them or remove them?



[TOPIC: post.html]
#2

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Corona Geek

  • 6,923 posts
  • Corona SDK

https://docs.coronalabs.com/api/library/native/setProperty.html#androidsystemuivisibility



[TOPIC: post.html]
#3

mohammadalshwaf

[GLOBAL: userInfoPane.html]
mohammadalshwaf
  • Observer

  • 5 posts
  • Corona SDK

 Hi, I added the following to main.lua :

native.setProperty( "androidSystemUiVisibility", "immersiveSticky" )

But nothing happens. is there anything else I should do?



[TOPIC: post.html]
#4

ldurniat

[GLOBAL: userInfoPane.html]
ldurniat
  • Contributor

  • 354 posts
  • Corona SDK

  Best Answer

Hi mohammadalshwaf,

 

Use code below from Sticker-Knight-Platformer/main.lua

-- Removes status bar on iOS
-- https://docs.coronalabs.com/api/library/display/setStatusBar.html
display.setStatusBar( display.HiddenStatusBar ) 


-- Removes bottom bar on Android 
if system.getInfo( "androidApiLevel" ) and system.getInfo( "androidApiLevel" ) < 19 then
    native.setProperty( "androidSystemUiVisibility", "lowProfile" )
else
    native.setProperty( "androidSystemUiVisibility", "immersiveSticky" ) 
end

From Post Is it possible to hide the Android navigation bar (the one with the home and back buttons) in Corona SDK?

@Rob Miracle: Do you want to hide the navbar for the entire app?  Then put them at the top of your main.lua. If you only want to hide them during your scene, then put them in scene:show() to hide them and turn them back on again in scene:hide().

 

Read more:

 

Have a nice day:)

 

ldurniat


Edited by ldurniat, 06 August 2018 - 11:14 AM.

  • roaminggamer likes this

[TOPIC: post.html]
#5

mohammadalshwaf

[GLOBAL: userInfoPane.html]
mohammadalshwaf
  • Observer

  • 5 posts
  • Corona SDK

 

Hi mohammadalshwaf,

 

Use code below from Sticker-Knight-Platformer/main.lua

-- Removes status bar on iOS
-- https://docs.coronalabs.com/api/library/display/setStatusBar.html
display.setStatusBar( display.HiddenStatusBar ) 


-- Removes bottom bar on Android 
if system.getInfo( "androidApiLevel" ) and system.getInfo( "androidApiLevel" ) < 19 then
    native.setProperty( "androidSystemUiVisibility", "lowProfile" )
else
    native.setProperty( "androidSystemUiVisibility", "immersiveSticky" ) 
end

From Post Is it possible to hide the Android navigation bar (the one with the home and back buttons) in Corona SDK?

 

Read more:

 

Have a nice day:)

 

ldurniat

 

 

Hi, thanks a lot. it worked.




[topic_controls]
[/topic_controls]