Monday, September 17, 2012

Locking Android Orientation Mode

You can lock the orientation mode for Android in Titanium by successfully implementing the following steps :

By following the below steps you can lock the orientation mode throughout the app.

 1) Create a custom AndroidManifest.xml (copy this from original generated source
2) Copy this on the created folder "platform/android/AndroidManifest.xml" at the top level of your project.(Inside your project root)
Locking Android Orientation Mode

3) Add this: android:screenOrientation="portrait" to all activities
4) Remove this: "|orientation" from all activities.

Here is my AndroidManifest.xml.

Here you can download the complete working project from my Github account Titanium-Android-Orientation


  1. Yes ...This is used by me and it's Working

  2. In android, how lock the screen for smaller screen but in bigger screen it have to work on both orientation like portrait and landscape. But in small screen it have to work on only portrait. Please suggest me.