android studio prevent rotation code example
Example 1: how to stop screen rotation in android code
android:screenOrientation="portrait"
Example 2: how to stop screen rotation in android code
<activity
...
...
android:screenOrientation="nosensor">