2

Titaniumでアプリケーションを作成します。クロス プラットフォーム (Android または iPhone) で動作します。Android デバイスでオリエンテーションを停止したいのですが、どうすればよいですか? Androidにはデフォルトの向きの変更があるためです。とiphoneはデフォルトではありません。

4

2 に答える 2

3
win.orientationModes = [Ti.UI.PORTRAIT];

これは機能しています...

于 2012-03-01T16:11:58.917 に答える
1

あらゆる種類の Android アプリケーションについて、以下の Android マニフェストで使用できます。

<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 dev center http://developer.appcelerator.com/question/22241/is-there-a-way-to-disable-orientation-change-on-the-ipadiphoneから以下のリンクを確認してください

于 2012-03-01T16:09:21.543 に答える