-1

I have one ListView and I have displayed an ArrayList of objects in my list. Each list item is a TableLayout. TableLayout has one TableRow. TableRow has 3 TextViews.

I want to show a border for the TextViews, so that my ListView will look like grid.

Can anyone tell me how can I set a border for TextViews in the TableRow?

lucian.pantelimon
  • 3,673
  • 4
  • 29
  • 46
user2740599
  • 449
  • 4
  • 10
  • 20

1 Answers1

1

Please try to use below code.

<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>
nilesh patel
  • 834
  • 1
  • 5
  • 10