I have a table layout in which i have declared a button statically in the XML file. I add rows dynamically in the program. I want the button to be set at the very end of the table layout. I tried doing that using android:layout_gravity="bottom" but that is not helping.
任何解决办法?
这是我的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>