【发布时间】:2012-03-01 15:49:05
【问题描述】:
我在 Titanium 上做了一个应用程序。其在跨平台(android 或 iphone)上的工作。 我想在 android 设备中停止方向我该怎么办? 因为,android 有默认的方向改变。和iphone没有默认。
【问题讨论】:
我在 Titanium 上做了一个应用程序。其在跨平台(android 或 iphone)上的工作。 我想在 android 设备中停止方向我该怎么办? 因为,android 有默认的方向改变。和iphone没有默认。
【问题讨论】:
win.orientationModes = [Ti.UI.PORTRAIT];
这是有效的......
【讨论】:
对于任何类型的 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
【讨论】: