How to disable the rotation of the apps

If you want to block the rotation of the app and want to lock it in portrait mode:

For Android apps:

  • Download the sources of your app.
  • Unzip the file you just downloaded.
  • Open the AndroidManifest.xml file
  • Add:

android:screenOrientation=”portrait”

in the line

<activity  android:configChanges=”orientation|keyboardHidden|keyboard|screenSize|locale” android:label=”@string/activity_name” android:launchMode=”singleTop” android:name=”MainActivity” android:theme=”@android:style/Theme.DeviceDefault.NoActionBar” android:windowSoftInputMode=”adjustResize”>

For iOS apps:

  • Download the sources of your app.
  • Unzip the file you just downloaded.
  • Open the xcode project in Xcode.
  • Click on “Apps Mobile Company” on the left tab.
  • Click on the “General” tab of the main window at the center.
  • Uncheck “Landscape left / right” of the “Deployment info” section.

Screen Shot 2015-09-28 at 16.14.39

Was this article helpful?

Related Articles