Jak wyłączyć rotację ekranu Android Studio
//put this <
this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
// > In your MainActivity.java
Good Giraffe
//put this <
this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
// > In your MainActivity.java
android:screenOrientation="portrait"
<activity android:name=".SomeActivity"
android:label="@string/app_name"
android:screenOrientation="portrait" />
<!-- inside of your AndroidManifest.xml -->
<activity android:name=".MainActivity"
android:screenOrientation="portrait"/>
<activity
...
...
android:screenOrientation="nosensor">