问题
I can't seem to find any way to force it to go landscape mode all the time. When I go to MyApp-app.xml and edit the <aspectRatio></aspectRatio> tags to landscape, only the main view is landscaped. If I navigate to the second view, it turns back to portrait. Any help?
回答1:
You can set it on Properties of the Document. Go to File>Publish Settings> Click on Configuration Player ("Air for Android", "Air for iOS", "Flash Player 11", etc). Now, mark the "Auto Orietation".
Like this:
Now, save, and Test.
回答2:
Devices could be a huge factor in this. What device are you having the problem on?
That said, in addition to setting aspectRatio to landscape I would try to set autoOrients to false:
<!-- The initial aspect ratio of the app when launched (either "portrait" or "landscape"). Optional. Mobile only. Default is the natural orientation of the device -->
<aspectRatio>landscape</aspectRatio>
<!-- Whether the app will begin auto-orienting on launch. Optional. Mobile only. Default false -->
<autoOrients>false</autoOrients>
来源:https://stackoverflow.com/questions/9248030/how-do-i-keep-my-mobile-air-application-on-landscape-mode