我想創建一個列分隔符的表。我想用垂直條形圖像分割我的列。爲了達到這個目的,我使用了"android:divider="@drawable/abc"
但它不起作用。下面是我的XML文件相同:如何在tablelayout中的列之間設置分隔符?
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:stretchColumns="*"
android:padding="5dip"
android:divider="@drawable/tracking_green"
>
<TableRow >
<TextView
android:id="@+id/retaileritem1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="xxxxxxx" />
<TextView
android:id="@+id/retaileritem2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="xxxxxxx" />
<ImageView
android:id="@+id/retailerimage1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:src="@drawable/tracking_green" />
</TableRow>
有什麼辦法改變分配器的顏色。 – 2014-02-17 11:23:51
例如: 如果您使用--- android:divider =「@ color/orangeBackground」 然後您可以在colors.xml中定義值,如---#FF8000 –
2014-02-18 01:20:06