我想将自动旋转屏幕值禁用为默认值。请告诉我android将如何获取默认值。
答案 0 :(得分:0)
你的意思是你想以纵向强制屏幕方向?
<activity android:screenOrientation="portrait"... />
答案 1 :(得分:0)
禁止方向改变不是一个好习惯。尽管如此,您可以直接在activity
的AndroidManifest.xml
标记中实现此目的:
android:screenOrientation=["unspecified" | "behind" |
"landscape" | "portrait" |
"reverseLandscape" | "reversePortrait" |
"sensorLandscape" | "sensorPortrait" |
"userLandscape" | "userPortrait" |
"sensor" | "fullSensor" | "nosensor" |
"user" | "fullUser" | "locked"]