我有1個線性佈局,裏面有1個表格佈局,裏面有2個表格行,每行內部有2個文字瀏覽。每個textwiev都有9.png.format的背景,看起來像一個按鈕。如何使TextView具有相同的大小,而不管文本內部如何
如何讓這些文字瀏覽器的所有文字大小相同,使背景圖像的尺寸相同?
這是我做媒體鏈接:
<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>
BTW。這只是一個屏幕的一部分,但其餘的並不重要,我認爲
CRO, 我似乎有一個類似的情況,並在我自己解決它[答案](http://stackoverflow.com/questions/7698397/textview-height-increase-when-decreasing-font-size/7707447#7707447) –