Я пытаюсь иметь tablelayout, содержит несколько tablerows. Одна из строк содержит 4 кнопки, в то время как вторая строка содержит очень длинный текст. Однако ширина кнопки простирается с текстом во второй строке. Там должен так или иначе предотвратить это?
http://img684.imageshack.us/i/tableview1.jpg/
http://img521.imageshack.us/i/tableview2.jpg/
Вот мой XML-файл: (так или иначе этот веб-сайт не является дружественным по отношению к 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
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"
>
попробуйте использовать android:layout_span="4" для TextView
Замените 4 на любое количество колонок (кнопок) в первой строке...
Также вы можете не указывать параметры android:layout_width и layout_height в Tablerow