开发者

Titanium Mobile orientation on Android

How do I set the screen orientation to portrait开发者_开发技巧 only on Android device using Titanium Studio?


There is an example project in the KitchenSink; Phone -> Orientation -> "Allow Landscape Only"


This works with SDK 1.8.2:

Create directory platform/android/ in your project directory. Find AndroidManifest.xml in build/android/ , copy and save it in platform/android/.

Edit platform/android/AndroidManifest.xml and replace all values of 'android:configChanges' attribute to :

android:configChanges="keyboardHidden"

and add 'android:screenOrientation' attribute in all 'activity' tags.

android:screenOrientation="portrait"
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜