Hi
I am trying to handle orientation changes by positioning elements relative to the current display.contentWidth and display.contentHeight. When I test this on the simulator, display.contentWidth and display.contentHeight have the values 320 and 480 respectively in portrait mode. In landscape mode, these values exchange places and become (width=480 and height=320) which is expected.
However, when I try this on an Android device the values do not change when the orientation changes. display.contentWidth is always 320 and display.contentHeight is always 480, regardless of orientation. The system.orientation value does correctly change to “landscapeLeft” or “landscapeRight” in landscape mode, so that seems to be working fine, but the content dimensions are fixed.
My build.settings file has this section:
orientation = { default = "portrait", supported = { "portrait", "landScapeLeft", "landScapeRight" } }
The config.lua file has this in it:
application = { content = { width = 320, height = 480, scale = "letterBox", fps = 60, },
Am I doing something wrong? Missing a setting somewhere?