views:

30

answers:

1

I am using three buttons along with the list view.These three buttons are added to the layout using the TableLayout and TableRow.The first button takes more space on content, so the other two becomes smaller in size than first one. When the application runs, it doesn't even show the two other buttons.

How can I make the size of three buttons equal and display all of them when application runs?Give me some example please.

Thanks

A: 

Put android:layout_span="3" on your TextView in the first row, and on your ListView in the second row.

From the documentation:

The width of a column is defined by the row with the widest cell in that column.

Since both the TextView and the ListView are in the first column, the first column is going to be as wide as the widest of those two. By setting the layout_span to 3, the three buttons at the bottom will be in their own cell with equal widths.

synic
you are a star, Thanks. Its working now but the size of one of the three buttons is still large. Thanks again
rob