How do I keep my mobile AIR application on landsca

2019-09-15 02:57发布

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?

2条回答
等我变得足够好
2楼-- · 2019-09-15 03:21

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:

enter image description here

Now, save, and Test.

查看更多
Animai°情兽
3楼-- · 2019-09-15 03:46

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>
查看更多
登录 后发表回答