简体   繁体   English

如何将移动AIR应用程序保持在横向模式下?

[英]How do I keep my mobile AIR application on landscape mode?

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. 当我转到MyApp-app.xml并将<aspectRatio></aspectRatio>标记编辑为landscape时 ,只有主视图才变为水平。 If I navigate to the second view, it turns back to portrait . 如果我导航到第二个视图,它会返回到portrait Any help? 有什么帮助吗?

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). 转到“文件”>“发布设置”>单击配置播放器(“ Air for Android”,“ Air for iOS”,“ Flash Player 11”等)。 Now, mark the "Auto Orietation". 现在,标记“自动排列”。

Like this: 像这样:

在此处输入图片说明

Now, save, and Test. 现在,保存并测试。

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: 也就是说,除了将aspectRatio设置为landscape外,我还将尝试将autoOrients设置为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>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何让我的iPhone应用程序以横向模式启动? - How do I get my iPhone app to start in Landscape mode? 如何在横向模式下正确打开我的应用程序 - How to correctly open my application in landscape mode 如何在Xcode 4中将iPad应用程序窗口旋转到横向? - How do I rotate my iPad application window to landscape in Xcode 4? Xcode 4.5:如何修复我的文本视图,以便它们在iPad上以纵向和横向模式正确显示? - Xcode 4.5: How do I fix my text views so they display properly in portrait and landscape mode on an iPad? 如何在应用加载之前将ipad设置为横向模式? - How do I set my ipad to landscape mode before the app loads? 在两种横向模式下,如何保持模态对话框接近顶部 - How do I keep my modal dialog close to the top in both landscape modes objective-c 如何在iPhone和iPad的横向模式下设置启动屏幕? - How do I set a splash screen in landscape mode on an iPhone and iPad? 如何在iPhone中禁用横向方向但在iPad上启用它? - How do I disable landscape orientation in iPhone but keep it enabled on iPad? 如何始终将我的ios应用保持在纵向模式 - How do I keep my ios app in portrait mode at all times 当我将模拟器旋转到横向模式时,为什么某些静态单元格从模拟器屏幕上消失了? - Why do some of my static cells disappear from the simulator screen when I rotate the simulator to a landscape mode?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM