0
<TableLayout android:layout_width="match_parent" android:id="@+id/tableLayout1" android:layout_height="wrap_content" android:stretchColumns="1">
<TableRow android:id="@+id/tableRow1" android:layout_width="wrap_content" android:layout_height="wrap_content">
    <TextView android:text="my name is Tarzan and i lives in Amazon Jungle. I want an android phone." android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content"></TextView>
    <TextView android:text="my name is Mowgly and i lives in Amazon Jungle. I want an android phone." android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="wrap_content"></TextView>
</TableRow>

2つの列を持つテーブルがあり、両方にTextViewを配置します。2番目の列を拡大します。しかし、両方のTextViewに長いテキストを設定すると、テーブルが電話の制限を超えて拡大するため、それが表示されません。 ..テーブルレイアウトを..で設定した場合も同じandroid:layout_width="fill_parent"です。どうすればよいですか?

4

1 に答える 1

0

android:maxWidth="100dip"..あなたのtextViewにそのようなタグを追加してください..

于 2011-06-22T09:38:01.710 に答える