Problems with orientation in Nexus 7

Hello!
 
I have this config:

[lua]local aspectRatio = display.pixelHeight / display.pixelWidth

application = {
content = {
width = aspectRatio > 1.5 and 320 or math.ceil( 480 / aspectRatio ),
height = aspectRatio < 1.5 and 480 or math.ceil( 320 * aspectRatio ),
scale = “letterBox”,
fps = 60,

imageSuffix = {
["@2x"] = 1.5,
["@4x"] = 3.0,
},
},

}[/lua]

And I’m having problems with the Nexus 7.

So I’m doing some tests.

I put an event to run in runtime like “orientation”, I updated values ​​contentWidth and contentHeight whenever the orientation varies.

What I thought was weird: when starting the application, if it is in “portrait” will give 320x482, and start the application in “landscape” will give 557x320. Another thing even more strange is that being in “portrait” and turning the tablet to “landscape” measures continue to be 482x320, and if you have started in “landscape” measures continue to be 320x557. Someone can explain this? This variation of 557 to 482 I think is the navigationBar but why to run for another position does not change the values​​?

Ex: I started in “portrait” (320x482); ran to “landscape” (482x320). Why 482 remains and does not pass to 557 once in width does not affect the already navigationBar?

This is urgent …

Someone can help me?

Thank you,

Tiago Eirinha

One more detail: if you put an element (0, 0) with a reference point = TopLeftReferencePoint, when I change the orientation of the (0, 0) no longer corresponds to (0, 0) of the screen. Advances few pixels in xx.

One more detail: if you put an element (0, 0) with a reference point = TopLeftReferencePoint, when I change the orientation of the (0, 0) no longer corresponds to (0, 0) of the screen. Advances few pixels in xx.