There must be 100 question about this, but nothing works for me.
I wan't my app to be in PORTRAIT mode only. I tried
win.orientationModes = [Titanium.UI.PORTRAIT];
and it is not working.
Why can't I just configure this in tiapp.xml like on iOS.
It is stupid to touch AndroidManifest.xml which changes after each build.
You don't have to touch AndroidManifest.xml each time. You can put the necessary directives into tiapp.xml. See this thread
It should be like -
The issue lies with the name of the activity. Many people are using the default name which starts with a period (Ex.
android:name='.MyAppActivity'). You should be using the base class name for the activity
<activity android:name="org.appcelerator.titanium.TiActivity" android:screenOrientation="portrait" android:configChanges="keyboardHidden|orientation"> </activity>
Try this -
android:screenOrientation="portrait" . It is working fine for me