开发者

Titanium Mobile orientation on Android

开发者 https://www.devze.com 2023-03-23 01:46 出处:网络
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 On

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

精彩评论

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