Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Height of Android Navigation Bar
Started by corona_pro Jun 22 2013 02:17 PM

7 replies to this topic
android admob navigation bar
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

corona_pro

[GLOBAL: userInfoPane.html]
corona_pro
  • Enthusiast

  • 38 posts
  • Enterprise

Is there a way to determine the height of the Android Navigation bar at the bottom as I am trying to place an advertisement banner (admob) at the bottom and it gets covered by the navigation bar?



[TOPIC: post.html]
#2

Falcon777

[GLOBAL: userInfoPane.html]
Falcon777
  • Contributor

  • 370 posts
  • Corona SDK

Interested to know.  Anyone with an answer?



[TOPIC: post.html]
#3

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 23,695 posts
  • Corona Staff

Have you looked at:

 

display.topStatusBarContentHeight?
 

http://docs.coronalabs.com/api/library/display/topStatusBarContentHeight.html



[TOPIC: post.html]
#4

Falcon777

[GLOBAL: userInfoPane.html]
Falcon777
  • Contributor

  • 370 posts
  • Corona SDK

Have you looked at:

 

display.topStatusBarContentHeight?
 

http://docs.coronalabs.com/api/library/display/topStatusBarContentHeight.html

 

Hi Rob,

 

Doesn't seem to work.  It does offset a little but part of it is still covered by the navigation bar and it varies from device to device.  I need this information to position my admob banner at the bottom of the screen without it being covered by the navigation bar.

 

Thanks.



[TOPIC: post.html]
#5

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 23,695 posts
  • Corona Staff

Can you print out the value you are getting as well as the value for display.contentScaleY?

 

There was a forum discussion about this a few weeks ago and I think it has to do with what you're using in your config.lua for scaling vs. the device's physical scale. 



[TOPIC: post.html]
#6

Falcon777

[GLOBAL: userInfoPane.html]
Falcon777
  • Contributor

  • 370 posts
  • Corona SDK

Can you print out the value you are getting as well as the value for display.contentScaleY?

 

There was a forum discussion about this a few weeks ago and I think it has to do with what you're using in your config.lua for scaling vs. the device's physical scale. 

 

I am using the config.lua from the Ultimate Config.lua Tutorial.

 

And to show the admob banner, I am doing something like this.

ads.show( "banner", { x=0, y=display.contentHeight - display.statusBarHeight } )



[TOPIC: post.html]
#7

krunalsptechnolab

[GLOBAL: userInfoPane.html]
krunalsptechnolab
  • Observer

  • 7 posts
  • Corona SDK

[TOPIC: post.html]
#8

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 23,695 posts
  • Corona Staff

Did you get the values printed out for the display.contentScaleY and display.topStatusBarContentHeight? 

 

display.statusBarHeight and display.topStatusBarContentHeight return different values.




[topic_controls]
[/topic_controls]