Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

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);
 
PREVIOUS NEXT
Tagged: #set #landscape #android #studio
ADD COMMENT
Topic
Name
9+6 =