[英]Where i can find default.xml file in android source code 4.2.2.(Jelly Bean)
我想禁用自动旋转屏幕值作为默认值。请告诉我android如何获取默认值。
您的意思是要强制将屏幕方向设为纵向?
<activity android:screenOrientation="portrait"... />
Prohibiting orientation changes is not a good practice. 禁止更改方向不是一个好习惯。 Nonetheless, you can achieve this directly within the activity
tag of your AndroidManifest.xml
: 尽管如此,您可以直接在AndroidManifest.xml
的activity
标签内实现此目的:
android:screenOrientation=["unspecified" | "behind" |
"landscape" | "portrait" |
"reverseLandscape" | "reversePortrait" |
"sensorLandscape" | "sensorPortrait" |
"userLandscape" | "userPortrait" |
"sensor" | "fullSensor" | "nosensor" |
"user" | "fullUser" | "locked"]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.