Есть ли лучший способ сделать это, чтобы кнопки были выровнены снизу с обеих сторон экрана? Важными частями являются alignParentBottom, который, по-видимому, доступен только в RelativeLayout, и layout_gravity, который, по-видимому, доступен только в LinearLayout и его подклассах, таких как TableLayout, из которых RelativeLayout не один.
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true">
<TableLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:stretchColumns="1">
<TableRow>
<Button
android:id="@+id/list_delete"
android:text="@string/list_delete"
android:visibility="invisible"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<Button
android:id="@+id/list_save"
android:text="@string/list_add"
android:layout_gravity="right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
</TableRow>
</TableLayout>
</RelativeLayout>
Android lint дает мне такие ошибки:
- Этот макет TableLayout или его родительский объект RelativeLayout бесполезен
- Этот макет TableRow или его родительский объект TableLayout бесполезен