display.topStatusBarContentHeight messed up on some android devices

On some android devices we have tested there seems to be a problem with display.topStatusBarContentHeight.

So most device when we set the top of our content to 0 + display.topStatusBarContentHeight it works fine… On some devices this puts the content too low on the screen and there is a gap between the status bar and the start of the content. Specifically on the Nexus 10 and the Razer M this is a problem.  On the Razer M it is off in a bigger way then on the Nexus 10… Since these are the only devices we have that have virtual (soft) navigation buttons on the bottom of the screen we are guessing that this has something to do with it. On those devices when I set the content to start at 0 instead of 0 + display.topStatusBarContentHeight the position is still slightly messed up but is much closer… The Razer M is reporting the size of display.topStatusBarContentHeight as 22.

Any ideas? Can we determine the size of the virtual buttons on the bottom of the screen?  This is a real problem for our game, we have a header that is not not at the top of the screen which makes other movable graphics appear above the header… I can compensate for this by making the header much bigger, but it looks nuts on the Razer M since it is now over twice as big as it should be.

Thanks,

Mike

We found a solution to our problem… If anyone is interested here are some usefull methods to get the actual screen coordinates while using the status bar.

local SCREEN\_LEFT = Display.screenOriginX local SCREEN\_RIGHT = Display.contentWidth - Display.screenOriginX local SCREEN\_WIDTH = SCREEN\_RIGHT - SCREEN\_LEFT local SCREEN\_CENTER\_X = SCREEN\_WIDTH/2+SCREEN\_LEFT local SCREEN\_TOP = Display.topStatusBarContentHeight + Display.screenOriginY local SCREEN\_BOTTOM = Display.contentHeight - Display.screenOriginY local SCREEN\_HEIGHT = SCREEN\_BOTTOM - SCREEN\_TOP local SCREEN\_CENTER\_Y = SCREEN\_HEIGHT/2+SCREEN\_TOP

+1 Thank you for sharing!

We found a solution to our problem… If anyone is interested here are some usefull methods to get the actual screen coordinates while using the status bar.

local SCREEN\_LEFT = Display.screenOriginX local SCREEN\_RIGHT = Display.contentWidth - Display.screenOriginX local SCREEN\_WIDTH = SCREEN\_RIGHT - SCREEN\_LEFT local SCREEN\_CENTER\_X = SCREEN\_WIDTH/2+SCREEN\_LEFT local SCREEN\_TOP = Display.topStatusBarContentHeight + Display.screenOriginY local SCREEN\_BOTTOM = Display.contentHeight - Display.screenOriginY local SCREEN\_HEIGHT = SCREEN\_BOTTOM - SCREEN\_TOP local SCREEN\_CENTER\_Y = SCREEN\_HEIGHT/2+SCREEN\_TOP

+1 Thank you for sharing!