屏幕方向"portrait"和用户方向"UserPortrait"有什么区别?

18

我需要了解屏幕方向用户图像纵向之间的真正区别。什么时候使用什么?

何时使用?

 android:screenOrientation="portrait"

什么时候?

 android:screenOrientation="userPortrait"
1个回答

17
"portrait"  Portrait orientation (the display is taller than it is wide).

"userPortrait"  

以纵向方式显示,但会根据设备传感器和用户传感器偏好自动切换成普通纵向或反转纵向。如果用户锁定了基于传感器的旋转,则行为与纵向相同,否则行为与sensorPortrait相同。API级别18中添加。

请参阅http://developer.android.com/guide/topics/manifest/activity-element.html


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接