android - separation between rows in table layout -


I am displaying a table layout in which I want a line of separation between rows in the table. Also the column table layout intelligent differently. Please help me

The following is my xml table layout:

     

Check it out This will work.

  & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; LinearLayout xmlns: android = "http://schemas.android.com/apk/res/android" Android: Layout_width = "Fill_parent" Android: Layout_height = "Wrap_content" android: background = "@ android: color / white" Android: Orientation = "vertical" Android: paddingBottom = "6dip" Android: paddingTop = "4dip" & gt; & Lt; TableLayout android: id = "@ + id / tablelayout" Android: layout_width = "fill_parent" Android: layout_height = "wrap_content" Android: PaddingRight = "2dip" & Gt; & Lt; TableRow & gt; & Lt; TextView Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" android: text = "revenue" & gt; & Lt; / TextView & gt; & Lt; TextView Android: layout_width = "150px" Android: layout_height = "wrap_content" android: layout_marginLeft = "150dp" Android: text = "expense" & gt; & Lt; / TextView & gt; & Lt; / TableRow & gt; & Lt; TableRow Android: layout_width = "match_parent" Android: layout_height = "wrap_content" & gt; & Lt; See android: id = "@ + id / Line 1" Android: layout_width = "match_parent" Android: layout_height = "1dip" Android: Layout_weight = "1" android: background = "# FF909090" android: padding = "2dip" / & Gt; & Lt; / TableRow & gt; & Lt; TableRow Android: layout_marginTop = "30px" & gt; & Lt; TextView android: layout_width = "wrap_content" Android: layout_height = "wrap_content" Android: text = "home:" & gt; & Lt; / TextView & gt; & Lt; Android: layout_heid = "wrap_content" Android: text = "home:" & gt; & Lt; / TextView & gt; & Lt; / TableRow & gt; & Lt; / TableLayout & gt; & Lt; / LinearLayout & gt;    

Comments