【问题标题】:how i stop orientation in Android device?我如何在 Android 设备中停止方向?
【发布时间】:2012-03-01 15:49:05
【问题描述】:

我在 Titanium 上做了一个应用程序。其在跨平台(android 或 iphone)上的工作。 我想在 android 设备中停止方向我该怎么办? 因为,android 有默认的方向改变。和iphone没有默认。

【问题讨论】:

    标签: titanium titanium-modules


    【解决方案1】:
    win.orientationModes = [Ti.UI.PORTRAIT];
    

    这是有效的......

    【讨论】:

      【解决方案2】:

      对于任何类型的 android 应用程序,您都可以在下面的 android manifest 中使用。

      <activity android:screenOrientation="landscape" android:name="org.appcelerator.titanium.TiActivity" android:configChanges="keyboardHidden"/>
      

      对于任何类型的 IOS 应用程序,您都可以在以下 xcode 的主 plist 文件中使用

      <key>UIInterfaceOrientation</key>
      <string>UIInterfaceOrientationLandscapeRight</string>
      

      对于 Titanium Mobile 特定;请从 Titanium 开发中心查看以下链接 http://developer.appcelerator.com/question/22241/is-there-a-way-to-disable-orientation-change-on-the-ipadiphone

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2014-04-09
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2012-01-08
        相关资源
        最近更新 更多