Nexus 7 objects off screen

Here’s what it’s supposed to look like:

pic16o.png

Weird.

The way I made a lot of positioning is.

theH = display.contentHeight theW = display.contentWidth theX = ((theW - 320) / 2) theY = (theH - 480) / 2

and pretty much added theX and theY to objects so that they would be placed according to the size of the device. So I don’t really see why they’d be off screen? Since it’s coded to take the extra size of the screen and move it down to center it, shouldn’t be able to go off screen.

display.contentWidth should be 320 and display.contentHeight should be 570 based on the config.lua.  I’m pretty sure that device is greater than a 1:1.72 ratio.

The problem is that the softbar is part of the screen’s pixel count.  Maybe try:

theH = display.contentHeight - 20

if you’re on Android (or whatever that distance needs to be)

Ah I get what you mean. I thought there was a command that would show how much the device loses? Or maybe it was something else.

Does display.statusBarHeight help at all?

Maybe the command was display.screenOriginY. I remember it used to give 0 on lots of devices but some would have like 14 or small amounts. Is this a Nexus/tablet thing, didn’t really put much effort in supporting tablets honestly, or is this for all Android devices having 20~ pixels off cuz of the softbar? Think I wouldov got a lot of complains if it was on normal devices too

Ok, reading the descriptions, it seems as if something is not displayed correctly. Thats not our case.

In our case, on this android device, the display is correct, but the hit area doesn’t match the display area of display objects, for instance rectangles. See http://forums.coronalabs.com/topic/34815-rectangles-hit-area-become-imprecise-shift-when-switching-to-landscape-mode/

It’s not a coding issue, as it works on ipad and simulator. Its not a problem in our code, as we don’t compute the hit area as we use an event listener. 

Has CL encountered a similar issue before ? Please let us know.

thanks

Frank

settings =

{

    androidPermissions =

    {

        “android.permission.VIBRATE”,

        “android.permission.INTERNET”

    },

    iphone =

        {

                plist =

                {

                        CFBundleIconFile = “Icon.png”,

                                        CFBundleIconFiles = {

                                                “Icon.png” ,             

                                                “Icon-hdpi.png” , 

                                                “Icon-ldpi.png” , 

                                                “Icon-mdpi.png”

                                        },

                        CFBundleDisplayName = “PLViewer”,

                        UIPrerenderedIcon = true,

                        UIApplicationExitsOnSuspend = true,

                        UIStatusBarHidden = true,                

                },

        },

  orientation = 

    {

       supported = { “landscapeLeft”, “landscapeRight”, “portrait”, “portraitUpsideDown”, }

    }

}

This is the one you are looking for:

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

@frank76, can you continue this in your original thread so we can keep this one on tack.  It’s really hard to try and solve different issues since readers don’t know which answers go with which questions.