android:screenOrientation =“sensorPortrait”无效?

时间:2012-10-22 18:58:15

标签: android eclipse android-orientation

我需要将我的应用限制为以纵向模式显示。

使用 android:screenOrientation =“Portrait”效果很好,但我希望在旋转设备时将显示更改为反转纵向。

使用 android:screenOrientation =“sensorPortrait”会导致编译错误。 有趣的是,如果我使用“sensorLandscape”而不是它编译得很好,但这不是我需要的。

我正在使用带有Android 2.3.3的Eclipse v 3.7.2

任何想法???

由于 罗布

1 个答案:

答案 0 :(得分:17)

Google犯了一个错字,使用 sensorPortait