Android orientation switching broken on Nexus 7 style displays

Switching between portrait and landscape causes postion and scaling issues on Android devices like the Nexus 7 which have device controls(home button, back button, menus button) rendered on the display instead of physical buttons on the device. Normal orientation switching works fine on other Android devices without this feature. It seems the Corona SDK doesn’t take into account the use of the bottom half of the display for the Android UI.

I’d file a bug report, but I no longer have a Nexus 7 to play with and give a good example file. It should be re-produceable with any sample

Tested this on build 922 on a Nexus 7 Tablet [import]uid: 88628 topic_id: 31575 reply_id: 331575[/import]

This is a known issue. In fact, it’s an issue on all Android tablets running Android 3.x and above. It occurs because tablets move the navigation bar when you change orientations, causing the screen to resize instead of swapping the width/height like it does on phone sized Android devices. Corona does not currently support “resize” events.

So, the only work-around at the moment is to use a fixed orientation for Android tablets. [import]uid: 32256 topic_id: 31575 reply_id: 126132[/import]

Any way for Corona to work around this issue internally, say for special cases like if (Nexus7 and usingNavigationBar), then on orientation change force a proper scale and position?’

Will this issue ever be resolvable either by Corona or Android? [import]uid: 88628 topic_id: 31575 reply_id: 126134[/import]

This is an issue with Corona’s core code. We would have to solve it on our end. Unfortunately, it is not a quick fix and it is extremely risky to make at the moment since the core code change would affect all platforms (iOS, Android, Mac, and Windows). Especially since we are trying to put the finishing touches on iOS 6 support… but we do plan on addressing this issue in the future. [import]uid: 32256 topic_id: 31575 reply_id: 126137[/import]

This is a known issue. In fact, it’s an issue on all Android tablets running Android 3.x and above. It occurs because tablets move the navigation bar when you change orientations, causing the screen to resize instead of swapping the width/height like it does on phone sized Android devices. Corona does not currently support “resize” events.

So, the only work-around at the moment is to use a fixed orientation for Android tablets. [import]uid: 32256 topic_id: 31575 reply_id: 126132[/import]

Any way for Corona to work around this issue internally, say for special cases like if (Nexus7 and usingNavigationBar), then on orientation change force a proper scale and position?’

Will this issue ever be resolvable either by Corona or Android? [import]uid: 88628 topic_id: 31575 reply_id: 126134[/import]

This is an issue with Corona’s core code. We would have to solve it on our end. Unfortunately, it is not a quick fix and it is extremely risky to make at the moment since the core code change would affect all platforms (iOS, Android, Mac, and Windows). Especially since we are trying to put the finishing touches on iOS 6 support… but we do plan on addressing this issue in the future. [import]uid: 32256 topic_id: 31575 reply_id: 126137[/import]