Здравствуйте. я создаю динамическую таблицу. Первая строка не динамическая
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#DEDEDE" >
<TableLayout
android:id="@+id/TableLayout1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#DEDEDE" >
<TableRow
android:id="@+id/tableRow1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@color/DarkGray" >
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/Black"
android:background="@drawable/cell_shape"
android:text="Аватар"
android:textSize="16dp"
android:textStyle="bold" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/Black"
android:background="@drawable/cell_shape"
android:text="Выезд"
android:textSize="16dp"
android:textStyle="bold" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/cell_shape"
android:text="Откуда"
android:textColor="@color/Black"
android:textSize="16dp"
android:textStyle="bold" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/cell_shape"
android:text="Куда"
android:textColor="@color/Black"
android:textSize="16dp"
android:textStyle="bold" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/Black"
android:background="@drawable/cell_shape"
android:text="М/Ц"
android:textSize="16dp"
android:textStyle="bold" />
</TableRow>
</TableLayout>
</ScrollView>
Вторая и следующие строки динамические:
<?xml version="1.0" encoding="utf-8"?>
<TableRow xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/TableRow1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#DEDEDE" >
<ImageView
android:id="@+id/imageStatus"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/cell_shape" />
<TextView
android:id="@+id/textVuezd"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/cell_shape"
android:text=""
android:textColor="@color/Black"
android:textSize="12dp" />
<TextView
android:id="@+id/textOtkuda"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/cell_shape"
android:text=""
android:textColor="@color/Black"
android:textSize="12dp" />
<TextView
android:id="@+id/textKuda"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/cell_shape"
android:text=""
android:textColor="@color/Black"
android:textSize="12dp" />
<TextView
android:id="@+id/textSeatsPrice"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/cell_shape"
android:text=""
android:textColor="@color/Black"
android:textSize="12dp" />
</TableRow>
Я запускаю эту таблицу как dialog. В итоге получается вот такая картина: http://www.autostarkiev.com.ua/gg.png
Из-за шрифта, другая часть таблицы не помещается на экране и таблица сама почему имеет отступы от края экрана.
Как сделать так, чтоб текст автоматически переносился на следующую строку, чтоб вся таблица помещалась?