So I put screenOrientation="nosensor" (also tried portrait, as I want every activity only to be able to be vertically) in manifest file, but it only works in MainActivity, but when I change to another activity, it can rotate the page again, why is this happening, and what should I do?
This is my manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.frisbeecaddy">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".ActivityNewGame2"></activity>
<activity android:name=".ActivityResume" />
<activity android:name=".ActivityNewGame" />
<activity android:name=".ActivityNewCourse" />
<activity android:name=".ActivityCourses" />
<activity android:name=".ActivityPlayers" />
<activity
android:name=".MainActivity"
android:screenOrientation="nosensor">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>