Я хочу выровнять две кнопки с линейным макетом, один слева и один справа, как и предыдущие и предыдущие кнопки в галерее изображений. Я попытался выровнять их, но это не сработает.
Код макета XML:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:background="@android:color/white"
android:gravity="bottom" >
<LinearLayout
android:id="@+id/linearLayout1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@android:color/black" >
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="prev"
android:layout_alignParentRight="true" />
<Button
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="next" />
</LinearLayout>
</LinearLayout>
Фактический выход:
Ожидаемый результат:
Как я могу это исправить?