I've developed an android app but I just need it to stand and can not lie down ... What's the best way to block the rotation? Thanks
I've developed an android app but I just need it to stand and can not lie down ... What's the best way to block the rotation? Thanks
You should go in the manifest of your project and for each activity you should add the following line
android:screenOrientation="portrait"
Example
<activity
android:name=".MainActivity"
android:screenOrientation="portrait"
android:label="@string/title_activity_main" >
</activity>
Put this in each Activity setRequestedOrientation (ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);