Locked landscape orientation on the tablet + activity starts when the device in portrait = visible rotation on the screen

I have an activity with a locked orientation (setRequestedOrientation in OnCreate). It works great on the phone and almost perfectly on the tablet.

The problem I ran into is cellular tablets (motorola xoom and samsung), when the activity starts, when the user holds the device in portait mode, the activity is first displayed in portait, and then after a split second it rotates the landscape. Is there any way to stop this?

+4
source share
1 answer

Try installing it in AndroidManifest.xml:

<activity android:name=".MyActivity" ... android:screenOrientation="landscape" /> 
0
source

Source: https://habr.com/ru/post/1393403/


All Articles