StageOrientation issues
Hello,
I have dial with Adobe AIR on Android.
When the application starts, it tries to recognize the current stage orientation to apply proper layout.
Also it uses StageOrientationEvent.ORIENTATION_CHANGE event to properly reflect when the device's orientation changes.
The main issue is that the values of StageOrientation enum are not absolute (StageOrientation.DEFAULT...).
On different devices those (StageOrientation.DEFAULT, StageOrientation.ROTATED_LEFT etc.) may mean different things.
For instance.
1. On Asus Nexus (Android 4.1.2) the StageOrientation.DEFAULT is mapped to portrait orientation.
2. On Texet TM-7025 (Android 4.0) the StageOrientation.DEFAULT is mapped to landscape orientation.
And...
It were not an issue if in StageOrientationEvent.ORIENTATION_CHANGE handler,
the stage dimensions would properly updated.
In this way I would be able to use this approach
http://help.adobe.com/en_US/as3/dev/WS901d38e593cd1bac40357fa212caafb9dd0-8000.html.
But, actually, it dosn't work due to sometimes the stageWidth and stageHeight have values as
before the StageOrientationEvent.ORIENTATION_CHANGE event. ((...
THE QUESTION: Is there an easy (correct) way to make this work properly?
Thanx in advance.
