How to set app to be portrait only? [duplicate]
As seen in the question:I want my android application to be only run in portrait mode?
You should set the configChanges
and screenOrientation
flags for every activity, and not at the root of your manifest.
So it should look like this:
<activity android:name=".MainActivity" android:configChanges="orientation" android:screenOrientation="portrait"> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter></activity>