私の画面レイアウトには中央のボタンが含まれています。そのボタンを画面の下部に揃えたいと思います。私はいくつかのコードで試しましたが、それは素晴らしいものになりました...
次のように私のxmlコード
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<Button
android:id="@+id/btnButton1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button 1"/>
<RelativeLayout
android:id="@+id/belowLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
>
<Button
android:id="@+id/btnButton2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="Left"/>
<Button
android:id="@+id/btnButton3"
android:layout_width="75px"
android:layout_height="50px"
android:layout_centerHorizontal="true"
android:text="..."/>
<Button
android:id="@+id/btnButton4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:text="Right"/>
</RelativeLayout>
</RelativeLayout>
スクリーンショット
ありがとう