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 which is in app/src/main/
Replace:
<activity
android:name=”.Application”

With

<activity
android:name=”.Application”
android:screenOrientation=”portrait”

Compile the APK with Android Studio following this article

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.

Was this article helpful?

Related Articles

Leave A Comment?