prevent屏幕旋转的android屏幕、prevent、android

由网友(掉了颗兔牙)分享简介:我有我的活动,我想prevent旋转,因为我在开始的AsyncTask之一,屏幕旋转使它重新启动。那么,有没有办法告诉这个活动不转动,即使用户正在晃动他的手机像疯了一样屏幕?I have one of my activities which I would like to prevent from rotating...

我有我的活动,我想prevent旋转,因为我在开始的AsyncTask之一,屏幕旋转使它重新启动。那么,有没有办法告诉这个活动不转动,即使用户正在晃动他的手机像疯了一样屏幕?

I have one of my activities which I would like to prevent from rotating because I'm starting an AsyncTask, and screen rotation makes it restart. So is there any way to tell this activity "DO NOT ROTATE the screen even if the user is shaking his phone like mad"?

推荐答案

添加安卓screenOrientation =画像在元素 清单还是横向的,你就大功告成了。

Add android:screenOrientation="portrait" to the element in the manifest or landscape and you're done.

阅读全文

相关推荐

最新文章