简体   繁体   中英

How i can set orientation screen 'PORTRAIT'

I think many Titanium developers go through this problem: How to restrict application orientation to PORTRAIT

I've tried in app.xml , creating files Manifest.xml but with no success Have you tried putting in the properties window "PORTRAIT" did not work. even tried this code

Ti.Gesture.addEventListener('orientationchange', function (e){
  Ti.Android.currentActivity.setRequestedOrientation(Ti.Android.SCREEN_ORIENTATION_PORTRAIT);
})

I'm using TabGroup and three window associated with it.

Anyone know how to solve this issue?

From now on, thank you all.

Have you seen this or this ?

Normally, you would put android:screenOrientation="portrait" android:configChanges="orientation|keyboardHidden" in each activity declaration in your android manifest

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM