how to disable screen rotation in android studio code example
Example 1: how to stop screen rotation in android code
android:screenOrientation="portrait"
Example 2: android studio turn off screen rotation
<!-- inside of your AndroidManifest.xml -->
<activity android:name=".MainActivity"
android:screenOrientation="portrait"/>