【问题标题】:How do I keep my mobile AIR application on landscape mode?如何让我的移动 AIR 应用程序保持横向模式?
【发布时间】:2012-02-12 10:20:09
【问题描述】:

我似乎找不到任何方法让它一直进入横向模式。当我转到 MyApp-app.xml 并将 <aspectRatio></aspectRatio> 标签编辑为 landscape 时,只有主视图是横向的。如果我导航到第二个视图,它会返回到 portrait。有什么帮助吗?

【问题讨论】:

    标签: ios apache-flex mobile air adobe


    【解决方案1】:

    您可以在文档的属性中设置它。转到文件>发布设置>单击配置播放器(“Air for Android”、“Air for iOS”、“Flash Player 11”等)。 现在,标记“自动定位”。

    像这样:

    现在,保存并测试。

    【讨论】:

      【解决方案2】:

      设备可能是其中的一个重要因素。您在什么设备上遇到问题?

      也就是说,除了将 aspectRatio 设置为横向之外,我还会尝试将 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>
      

      【讨论】:

      • 我已经正确设置了 aspectRatio 和 autoOrients。但如果我移动到下一个视图,它会恢复为纵向。我的目标是 iPhone 4 设备。
      • 好的,我将整个内容导出到 FXP,您可以在此处下载 mediafire.com/download.php?26a6j1ouo61b7kw
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-07-11
      • 2020-08-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多