7
I developed an android app but I need it to just stand up can not lie down... What would be the best way to block the rotation ? Thank you
7
I developed an android app but I need it to just stand up can not lie down... What would be the best way to block the rotation ? Thank you
14
You must go in the manifest of your project and for each Activity you must add the following line
android:screenOrientation="portrait"
Example
<activity
android:name=".MainActivity"
android:screenOrientation="portrait"
android:label="@string/title_activity_main" >
</activity>
2
Put this in each Activity
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
Browser other questions tagged java android
You are not signed in. Login or sign up in order to post.
where I put it on the manifest ?
– Augusto Furlan
In the Androidmanifest.xml file open it, in it there is an Activity tag for each Activity of your project within the tag vc adds the line I said above and as it is in the example tbm above
– Caique Oliveira
I put in the manifest and activitys , but it didn’t work
– Augusto Furlan
Now gave, was putting in wrong place XD
– Augusto Furlan