如何设置背景颜色include
安卓中的标签?这不起作用:
<include
android:id="@+id/list_item_section_text"
android:layout_width="fill_parent"
android:layout_height="match_parent"
layout="@android:layout/preference_category"
android:background="%MY_BACKGROUND%"/>
如果你不是“太深见树偏执”类型的人,你可以包裹你的include
in FrameLayout
:
<FrameLayout
android:id="@+id/list_item_section_text"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:background="%YOUR_BACKGROUND%">
<include layout="@android:layout/preference_category"/>
</FrameLayout>
EDIT: 当然,别忘了删除android:background
从你的preference_category.xml
首先布局。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)