According to the Android aspect of open one-way traffic, there are two ways to implement borders for TableLayout.
Use stroke
<?xml version="1.0" encoding="UTF-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android"> <solid android:color="#00ffffff"/> <stroke android:width="1dp" android:color="#ffffff"/> </shape>
However, this is not what I want, since I only need a lower bound. Therefore, I try another alternative.
Use 2 layers
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item> <shape> <solid android:color="#ffffff" /> </shape> </item> <item android:bottom="1dp"> <shape> <solid android:color="#000000" /> </shape> </item> </layer-list>
However, when choosing a list TableRow
will not be highlighted with the ListView
selection color, since its background is already captured by the "# 000000" layer.
Is there a better way to have a lower border, but it will obey the color of the selection of the ListView
?
source share