android disable screen rotation programmatically 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">