XML Table layout? Two EQUAL-width rows filled with equally width buttons??
- by Oliver Goossens
Hi heres a part from my XML for LAND format:
<TableLayout
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_gravity="center"
android:stretchColumns="*">
<TableRow>
<Button
android:id="@+id/countbutton"
android:text="@string/plus1"/>
<Button
android:id="@+id/resetbutton"
android:text="@string/reset"
/>
</TableRow>
</TableLayout>
And now what I dont get - the WIDTH of one row and also of the button depends on the TEXT inside the button. If the both texts are equaly long lets say : TEXT its ok - the table half is in the middle of the screen. But if they have different size - lets say "A" and "THIS IS THE LONG BUTTON" the CENTER of the table isnt in the middle of the screen anymore and so the buttons are not equally width...
Cant find any solution...
Please advise...
Thank you
Oliver Goossens