我使用了相对布局,想将按钮设置在屏幕底部。但是这会把它放到底部,我希望在屏幕/视图的末尾和按钮之间留出一些空间。但无论我怎么做,按钮的外边距在2.1+上似乎都没有用。由于相对布局包含背景,所以我不能在其上设置外边距。
有人知道解决方法吗?
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="0dp"
android:background="@drawable/background" >
<Button
android:id="@+id/confirm_mobile_button_next"
android:layout_width="fill_parent"
android:layout_height="40dip"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="false"
android:layout_centerHorizontal="false"
android:layout_centerInParent="false"
android:layout_margin="15dp"
android:background="@drawable/button_shape_selector"
android:paddingLeft="10dip"
android:paddingRight="10dip"
android:text="@string/confirm_mobile_no_continue"
android:textColor="@color/white"
android:textStyle="bold" />
</RelativeLayout>