【发布时间】:2014-02-28 20:14:09
【问题描述】:
我正在训练通过资源使用常量值更改清单中的 screenOrientation。这是我的清单的一个活动:
<activity
android:name="it.wrapmobile.parcosigurta.NavActivity"
android:label="@string/app_name"
android:screenOrientation="@integer/orientation" >
</activity>
我想用这个常量http://developer.android.com/reference/android/R.attr.html#screenOrientation、10 英寸横向、7 英寸横向、智能手机纵向更改我的 screenOrientation,所以我在 3 个不同的目录中创建了资源 xml:
值/整数.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<integer name="orientation">1</integer>
</resources>
值-大/integer.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<integer name="orientation">0</integer>
</resources>
values-sw600dp/integer.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<integer name="orientation">0</integer>
</resources>
但在所有设备中,应用始终是纵向的。我错了什么? 谢谢你的帮助。
M
【问题讨论】:
标签: android xml orientation manifest