TableLayout を使用してデータを表示しています。アクティビティが onCreate() を呼び出すと、右側の列の TextViews のテキストが設定されます。
さて、次の画像でわかるように、住所テキストは長くなる可能性があり、折り返す必要があります。だから私は設定しandroid:layout_width="wrap_content"
ました。ただし、データをラップするには画面サイズの幅が必要です。どうすればこの問題を克服できますか?
私のxml:
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5px">
<TableRow>
<TextView android:text="Job#"
android:paddingRight="5px" />
<TextView android:id="@+id/DetailJobNo" />
</TableRow>
<TableRow>
<TextView android:text="Address"
android:paddingRight="5px" />
<TextView android:id="@+id/DetailAddress"
android:layout_width="wrap_content"
android:text="Address Address Address Address Address Address Address Address "/>
</TableRow>
</TableLayout>