I want my APP to only run vertically but I can't, I have implemented the following without success.
Manifest:
< application
...
android:configChanges="orientation"
android:screenOrientation="portrait">
Exercise:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
...
android:orientation="vertical">
In your file
Mainfest.xml
find the tags of the activities you want to block in a given rotation.You need to add to all of your activity not just for one, i.e. set this for all of your activities:
Explanation:
Another way is:
Use
setRequestedOrientation()
as shown here: