android studio set portrait only code example
Example 1: only portrait mode android studio
<activity android:name=".YourActivity"
android:configChanges="orientation"
android:screenOrientation="portrait"/>
Example 2: how to make android app only portrait
<activity android:name=".YourActivity"
android:configChanges="orientation"
android:screenOrientation="portrait"/>