转自http://www.myexception.cn/mobile/426228.htmlTableLayout设置行与行之间的分割线
<View
android:layout_height="1dip"
android:background="#B7B7B7" />
<TableLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:background="@drawable/list_bg_border" >
<TableRow android:padding="10dp" >
<me.mcar.parking.control.AutoAjustSizeTextView
style="@style/detail_text_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/parkdetail_rushHours_text" />
<TextView
android:id="@+id/parkdetail_rushHours"
style="@style/detail_text_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</TableRow>
<View
android:layout_height="1dip"
android:background="#B7B7B7" />
<TableRow android:padding="10dp" >
<TextView
style="@style/detail_text_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/parkdetail_amount_text" />
<TextView
android:id="@+id/parkdetail_amount"
style="@style/detail_text_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</TableRow>
<View
android:layout_height="1dip"
android:background="#B7B7B7" />
<TableRow android:padding="10dp" >
<TextView
style="@style/detail_text_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/parkdetail_price_text" />
<TextView
android:id="@+id/parkdetail_price"
style="@style/detail_text_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="10"
android:ellipsize="end"
android:singleLine="true"
android:width="150dp" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:contentDescription="@string/parkdetail_price_detail"
android:src="@drawable/detail_btn" />
</TableRow>
</TableLayout>