flash - air android app always launches in portrait mode irrespective of the way the android device is held ( landscape/portrait) -
i have air android app running on android device ( samsung tab ). want app laid out in landscape mode when user starts app holding device in landscape ( same goes portrait ).
but air app gets started in portrait mode irrespective of way device held.
i tried following ways -
use stage.deviceorientation (but when app starts (after applicationcomplete notification ) value unknown)
use stage resize event. (this gets triggered @ start itself, manual resize not required - values based on portrait mode though - width 600 , height 1024 (should have been otherway) )
i correct values when try changing orientation of device, @ startup see problem required values.
could please advice on problem ?
thanks
use getresources().getconfiguration().orientation
.
if(mycurrentactivity.getresources().getconfiguration().orientation == configuration.orientation_portrait) { // code portrait mode } else { // code landscape mode }
Comments
Post a Comment