3つの列があり、各列が可能な限り最大のスペースを使用するこのテーブルレイアウトを試しています(strechColumnタグを使用)。これで、列に長すぎるコンテンツが含まれると、テーブルレイアウトが画面から飛び出します。
表のレイアウトが画面から飛び出さないように、列の内容を折り返すように設定するにはどうすればよいですか。
これが私が使用したテーブルレイアウトのXMLコードです
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:scrollbars="vertical"
android:layout_height="fill_parent"
android:layout_width="fill_parent">
<TableLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:stretchColumns="0,1,2"
android:id="@+id/tLayout"
android:scrollbars="vertical"
>
<TableRow
android:layout_width="fill_parent">
<TextView
android:padding="3dip"
android:gravity="left"
android:text="Name"
/>
<TextView
android:padding="3dip"
android:gravity="left"
android:text="Address"
/>
<TextView
android:padding="3dip"
android:gravity="left"
android:text="Age"
/>
</TableRow>
</TableLayout>
</ScrollView>