Tôi đang cố gắng để có tablelayout chứa một số tablerows. Một trong các hàng chứa 4 nút, trong khi hàng thứ hai chứa văn bản rất dài. Tuy nhiên, chiều rộng của nút trải dài với văn bản trong hàng thứ hai. Có cách nào để ngăn chặn điều này?android: tablerow trộn với các cột và văn bản nhiều dòng
alt text http://i40.tinypic.com/34srli0.jpgalt text http://i44.tinypic.com/2505dmf.jpg
http://img684.imageshack.us/i/tableview1.jpg/
http://img521.imageshack.us/i/tableview2.jpg/
Đây là tập tin xml của tôi: (bằng cách nào đó trang web này là không thân thiện với file xml)
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>
Button
android:id="@+id/widget31"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button"
>
</Button>
Button
android:id="@+id/widget32"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button"
>
</Button>
Button
android:id="@+id/widget33"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button"
>
</Button>
</TableRow>
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"
>
</TextView>
</TableRow>
</TableLayout>
</AbsoluteLayout>
Cũng cố gắng để thiết lập các thuộc tính trong mã, không hoạt động. Có phải là một lỗi của android? – Yang