我有一个ListView,并且在我的列表中显示了一个ArrayList对象。每个列表项都是一个TableLayout. TableLayout有一个TableRow。TableRow有 3TextView秒。
我想为TextViews 显示一个边框,以便我ListView看起来像网格。
谁能告诉我如何为TextViews 中的 s设置边框TableRow?
我有一个ListView,并且在我的列表中显示了一个ArrayList对象。每个列表项都是一个TableLayout. TableLayout有一个TableRow。TableRow有 3TextView秒。
我想为TextViews 显示一个边框,以便我ListView看起来像网格。
谁能告诉我如何为TextViews 中的 s设置边框TableRow?
请尝试使用以下代码。
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:padding="10dp"
android:shape="rectangle" >
<stroke
android:width="1dp"
android:color="#C0C0C0" />
<solid android:color="#C0C0C0" />
<corners
android:bottomLeftRadius="5dp"
android:bottomRightRadius="5dp"
android:topLeftRadius="5dp"
android:topRightRadius="5dp" />
</shape>