0

I am setting activity orientation landscape dynamically in onCreate function. Its working fine. But the problem is that some time for a while activity is shown portrait and then changes to landscape. How can i avoid the transition from portrait to landscape. I am using setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);.

Thanks.

4

1 回答 1

0

将这些添加到清单文件中的活动声明中:

android:configChanges="orientation|keyboardHidden"
android:screenOrientation="landscape"
于 2012-08-28T13:33:42.043 回答