我有一個相對佈局。 它有兩個並排的按鈕,它是右對齊的。如何在RelativeLayout中添加間距
所以這是我的佈局xml文件。我的問題是最右邊的按鈕和RelativeLayout的右邊框之間以及2個按鈕之間沒有間距。我如何添加?我玩android:paddingRight,但沒有任何幫助。
謝謝。
<RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:paddingLeft="0dp" android:paddingRight="10dp">
<Button android:id="@+id/1button" android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:paddingLeft="10dp" android:paddingRight="10dp"/>
<Button android:id="@+id/1button" android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@id/1button"
android:paddingLeft="10dp" android:paddingRight="10dp"/>