It may be common instinct for you to place a horizontal line in a TableLayout within the TableRow tags. However, when I did try that, the horizontal line never stretched to fill the whole width.

The trick is not to place the View tag inside the TableRow tag but outside of it. See example below.

If you want to have columns in your TableLayout having even widths, use the android:stretchColumns attribute and use the asterisk value to have all of them evened out.

Or … you can do it using the uneasy route by doing this

This sample is if your TableLayout has 3 columns.

Related Posts Plugin for WordPress, Blogger...