【问题标题】:Air mobile device orientation on initialize of the app初始化应用程序时的空中移动设备方向
【发布时间】:2014-04-24 18:01:02
【问题描述】:

我为手机和平板设备开发了一个应用。 当设备是手机时,应用程序将仅以纵向显示。 当设备是平板电脑时,应用将仅以横向显示。

这没问题,工作正常。在应用程序 XML 中,默认 aspectRation 是纵向。 因此,如果设备是平板电脑,我会在运行时检查并将 aspectRation 更改为横向。 _nativeStage.autoOrients = true; _nativeStage.setAspectRatio(StageAspectRatio.LANDSCAPE); 一切正常。

只有一个问题: 例如,当您将 iPad 旋转到倒置时(硬件菜单按钮现在位于设备的左侧;))然后启动应用程序,设备默认旋转为右旋。 因此,该应用程序处于领先地位。 ios操作栏也在底部。

我没有找到我在启动时获得当前方向的位置。 当我检查 stage.deviceOrientation 或 stage.orientaion 时,我在两个方向上都只得到“默认”或“未定义”。 (正常或倒置)

也许有人知道在启动时从设备获得正确旋转的解决方案。比我可以检查并可以制作 stage.setOrientation(StageOrientation.ROTATED_RIGHT);或 stage.setOrientation(StageOrientation.ROTATED_LEFT);

请帮帮我:(

【问题讨论】:

    标签: actionscript-3 ipad mobile air device-orientation


    【解决方案1】:

    我找到了解决方案... :D 只需将 app.xml 文件中的 aspectRatio 标记设置为“any”即可... 可能有人帮忙

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-11-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-12-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多