android: tablerow mixed with columns and multiline text

Posted by Yang on Stack Overflow See other posts from Stack Overflow or by Yang
Published on 2010-05-03T17:22:56Z Indexed on 2010/05/03 17:28 UTC
Read the original article Hit count: 840

Filed under:
|
|

I am trying to have a tablelayout contains several tablerows. One of the rows contains 4 buttons, while the second row contains a very long text. However, the width of the button stretches with the text in the second row. Is there anyway to prevent this?

http://img684.imageshack.us/i/tableview1.jpg/

http://img521.imageshack.us/i/tableview2.jpg/

Here is my xml file: (somehow this website is not friendly to xml file)

AbsoluteLayout android:id="@+id/widget0" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" >

TableLayout android:id="@+id/widget28" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" android:layout_x="0px" android:layout_y="10px" >

TableRow android:id="@+id/widget29" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" >

Button android:id="@+id/widget30" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Button" >

Button android:id="@+id/widget31" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Button" >

Button android:id="@+id/widget32" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Button" >

Button android:id="@+id/widget33" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Button" >

TableRow android:id="@+id/widget35" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" >

TextView android:id="@+id/widget40" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="TextViewTextViewTextViewTextViewTextViewTextView" >

© Stack Overflow or respective owner

Related posts about android

Related posts about tablelayout