With this xml:
Dont understand....
Cant see layout_width attribute,layout_height attribute for TableRow.no Elements can be without these attributes.
Your problem is that the width specification in your xml is ignored. From the docs for TableRow:
The children of a TableRow do not need to specify the layout_width and layout_height attributes in the XML file. TableRow always enforces those values to be respectively MATCH_PARENT and WRAP_CONTENT.
P.S. Did you have a compelling reason to use absolute pixels? That's generally considered bad practice.
P.P.S. Double-posting my answer to go with the double-posting of your question. :)
Have you looked at this question?
Button width in Android TableLayout
The issue could be caused by using android:stretchColumns="*"
in your TableLayout
, but it is difficult to tell without the rest of your XML.