Skip to content Skip to sidebar Skip to footer

Screen Orientation Forced To Portrait, But Still, The Activities Will Rotate To Landscape When Tilted!! How To Force Portrait Mode?

I've searched stackoverflow for this and didn't get any solution to what I am looking for. In my manifest file I am writing the following line for each activity android:screenOrien

Solution 1:

May be this will help

In your manifest file after your main activity write below line

 android:screenOrientation="portrait"

Or in your coding after setContentView() add this line..

setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);

Post a Comment for "Screen Orientation Forced To Portrait, But Still, The Activities Will Rotate To Landscape When Tilted!! How To Force Portrait Mode?"