[英]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). 我有一个锁定方向的活动(OnCreate中的setRequestedOrientation)。 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. 我遇到的问题是蜂窝平板电脑(motorola xoom和samsung),当用户将设备保持在肖像模式时开始活动,活动最初显示在portait中,然后在几分之一秒后旋转到横向。 Is there any way to stop it from happening?
有没有办法阻止它发生?
Try to preset it in AndroidManifest.xml: 尝试在AndroidManifest.xml中预设它:
<activity android:name=".MyActivity"
...
android:screenOrientation="landscape"
/>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.