how to disable screen rotation android studio code example
Example 1: how to stop screen rotation in android code
android:screenOrientation="portrait"
Example 2: android disable landscape mode
<activity android:name=".SomeActivity"
android:label="@string/app_name"
android:screenOrientation="portrait" />
Example 3: how to stop screen rotation in android code
<activity
...
...
android:screenOrientation="nosensor">