XML ファイルでボタンを静的に宣言したテーブル レイアウトがあります。プログラムで行を動的に追加します。ボタンをテーブル レイアウトの最後に設定したい。私は android:layout_gravity="bottom" を使用してそれを試みましたが、それは役に立ちません。
解決策はありますか?
これは私のXMLです
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:scrollbars="horizontal|vertical"
android:scrollbarStyle="outsideInset" >
<TableLayout
android:id="@+id/table"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button
android:id="@+id/back"
android:layout_gravity="bottom"
/>
</TableLayout>
</ScrollView>