私はネットの検索でデューデリジェンスをしましたが、以下のための適切な解決策を見つけることができません。Androidボタンのアラインメント
私はテーブルレイアウトとテーブル行を使用しています。私はTEXTで3つのボタンを入れています。ここにレイアウトファイルのサンプルがあります。
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tlRemoteTable"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:stretchColumns="*">
<TableRow
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1">
<Button
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="ABCD" />
<Button
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="ABCDEFGHI" />
<Button
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="ABCDEFGHIJKLMNOP" />
</TableRow>
</TableLayout>
画像結果はここにある:
私の目的は、それも、すべての1/3比を有するメイクです。私は、テキストの長さがそれを拡張するものであることを理解しています。代わりにテキストを折り返すことはできますか?
最終的な結果は、動的に生成されるファイルになります。だから、私はXMLの代わりにそれをプログラミングするでしょう。