需求:
4.2 原生的catagory通常 是一个title, 一条线, 通常是黑色的或白色的线, 现在有一个需求是 改变title的颜色,改变横线颜色的值。
1. 先定义这个category 的布局(布局里没有设置颜色值, 我们将在代码中设置颜色, 当然, 在 xml里也可以设置颜色):
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:id="@+id/preference_title"
android:layout_marginTop="1dip"
android:layout_marginBottom="1dip"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
<View
android:id="@+id/preference_