![](/img/trans.png)
[英]Activity going in loop when device orientation is changed from portrait to landscape
[英]Locked landscape orientation on tablet + activity started when device in portrait = visible rotation on screen
我有一个锁定方向的活动(OnCreate中的setRequestedOrientation)。 它在手机上工作正常,在平板电脑上几乎没问题。
我遇到的问题是蜂窝平板电脑(motorola xoom和samsung),当用户将设备保持在肖像模式时开始活动,活动最初显示在portait中,然后在几分之一秒后旋转到横向。 有没有办法阻止它发生?
尝试在AndroidManifest.xml中预设它:
<activity android:name=".MyActivity"
...
android:screenOrientation="landscape"
/>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.