android 固定竖屏,需要捕获用户的转屏事件,求解

samsamdif 发布于 2013/06/01 23:31
阅读 670
收藏 0

前提条件是 android 固定为竖屏

但是需要知道捕获不了用户转屏事件,是横屏还是竖屏 ,请问怎么实现?

AndroidManifest.xml 设置为android:screenOrientation="portrait"

onConfigurationChanged 捕获不了用户转屏事件。。

加载中
0
bihaiyise
bihaiyise
你的SDK包是多少
samsamdif
samsamdif
4.0, 谢谢了,换了一种解决方案了~
0
bihaiyise
bihaiyise

android:configChanges="orientation|keyboardHidden|screenSize"

The screen orientation has changed — the user has rotated the device.

Note: If your application targets API level 13 or higher (as declared by the minSdkVersion and targetSdkVersion attributes), then you should also declare the "screenSize" configuration, because it also changes when a device switches between portrait and landscape orientations.

0
深海的孤独
深海的孤独
请教下楼主是怎么解决的呢?
返回顶部
顶部