set orientation of application to potrait by defau;t code example
Example: only portrait mode android studio
<activity android:name=".YourActivity"
android:configChanges="orientation"
android:screenOrientation="portrait"/>
<activity android:name=".YourActivity"
android:configChanges="orientation"
android:screenOrientation="portrait"/>