Я не могу заставить свой TableLayout поместиться внутри экрана when the text cell is large
, несмотря на перенос текста inside the cell
.
Это мой TableLayout. Простая таблица с двумя строками и двумя столбцами. Ячейки левого столбца multiline
. Если текст одной из этих ячеек достаточно большой, чтобы разбить его на две строки, столбец растягивается, чтобы заполнить весь экран, а правые столбцы выталкиваются за пределы экрана.
Почему? Как заставить полный стол оставаться внутри экрана?
Любая подсказка приветствуется.
My TableLayout выглядит следующим образом:
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/myTableLayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TableRow>
<TextView
android:text="Account 4 with a very large name to see if it breaks on two or more lines"
android:singleLine="false"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
</TextView>
<TextView
android:text="$400.00"
android:gravity="right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
</TextView>
</TableRow>
<TableRow>
<TextView
android:text="Account 5"
android:singleLine="false"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
</TextView>
<TextView
android:text="$400.00"
android:gravity="right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
</TextView>
</TableRow>
</TableLayout>
Код для отображения макета является основным:
public class AccountBrowserTest
extends Activity
{
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
this.setContentView(R.layout.accountbrowser_test);
}
}