简体   繁体   中英

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

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

The problem I have is with honeycomb tablets (motorola xoom and samsung), when activity is started when the user holds the device in portait mode, the activity is initially displayed in portait and then after a fraction of a second it rotates to landscape. Is there any way to stop it from happening?

Try to preset it in AndroidManifest.xml:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM