how to stop screen rotation in android code

88

how to stop screen rotation in android code -

android:screenOrientation="portrait" 

android studio turn off screen rotation -

<!-- inside of your AndroidManifest.xml -->
<activity android:name=".MainActivity"
		  android:screenOrientation="portrait"/>

how to stop screen rotation in android code -

<activity
        ...
        ...
        android:screenOrientation="nosensor">

how to prevent screen rotating in app android studio -

android:screenOrientation="portrait or landscape" 

Comments

Submit
0 Comments