Answers for "how to make both portrait and landscape mode work in android studio"

-2

only portrait mode android studio

<activity android:name=".YourActivity"
    android:configChanges="orientation"
    android:screenOrientation="portrait"/>
Posted by: Guest on August-23-2020
0

how to set landscape in android studio

in the manifest, set as attribute of the node activity the code below:
android:screenOrientation="landscape"

Also, in you MainActivity Class, inside the onCreate method, after the super call type:
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
Posted by: Guest on November-24-2020

Code answers related to "how to make both portrait and landscape mode work in android studio"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language