inside the cell
のテキストが囲まれていますが、when the text cell is large
に合わせてTableLayoutを取得できません。Androidテーブルレイアウトの書式設定に問題があります
これは私のTableLayoutです。単純な2行2列のテーブル。左の列のセルはmultiline
です。これらのセルの1つのテキストが2行で分割するのに十分な大きさである場合、列は画面全体を埋めるように引き伸ばされ、右側の列は画面から押し出されます。
なぜですか?どのようにしてテーブル全体を強制的に画面内にとどめることができますか? ヒントは歓迎されます。
マイTableLayoutは以下の通りです:レイアウトを表示するには
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/myTableLayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TableRow>
<TextView
android:text="Account 4 with a very large name to see if it breaks on two or more lines"
android:singleLine="false"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
</TextView>
<TextView
android:text="$400.00"
android:gravity="right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
</TextView>
</TableRow>
<TableRow>
<TextView
android:text="Account 5"
android:singleLine="false"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
</TextView>
<TextView
android:text="$400.00"
android:gravity="right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
</TextView>
</TableRow>
</TableLayout>
コードは基本的なものです:
public class AccountBrowserTest
extends Activity
{
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
this.setContentView(R.layout.accountbrowser_test);
}
}
とまさにこれが意味を拡張..あなたを助けますか?これが解決策であることはどうでしたか? – Paul