У меня есть 1 линейный макет, внутри него у меня есть 1 макет таблицы, а внутри у меня 2 строки таблицы, а внутри каждой строки у меня 2 текстовых просмотра. У каждого textwiev есть фон в 9.png.format, похожий на кнопку.
Как сделать так, чтобы эти текстовые представления имели одинаковый размер относительно его текстов, делая фоновые изображения одинакового размера?
Вот что я уже сделал:
<LinearLayout android:layout_height="fill_parent"
android:gravity="bottom"
android:layout_width="fill_parent"
android:layout_weight="2">
<TableLayout android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:stretchColumns="0 1">
<TableRow android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:padding="2dp">
<TextView android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/answer_small_off"
android:layout_weight="1"
android:text="@string/hello"
android:gravity="center"
android:id="@+id/main_text_answer1"
android:lines="3"
android:maxLines="3"
android:textSize="10dp" android:minLines="3" android:minEms="20" android:maxEms="20" android:ems="20">
</TextView>
<TextView android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/answer_small_off"
android:layout_weight="1"
android:text="@string/hello"
android:gravity="center"
android:id="@+id/main_text_answer2"
android:lines="3"
android:maxLines="3"
android:textSize="10dp">
</TextView>
</TableRow>
<TableRow android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="2dp">
<TextView android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/answer_small_off"
android:layout_weight="1"
android:text="@string/hello"
android:gravity="center"
android:id="@+id/main_text_answer3"
android:lines="3"
android:maxLines="3"
android:textSize="10dp">
</TextView>
<TextView android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/answer_small_off"
android:layout_weight="1"
android:text="@string/hello"
android:gravity="center"
android:id="@+id/main_text_answer4"
android:lines="3"
android:maxLines="3"
android:textSize="10dp">
</TextView>
</TableRow>
</TableLayout>
</LinearLayout>
кстати. это только часть экрана, но остальное не важно, я думаю