我有一个RelativeLayout2 Buttons 里面。
一个Button有layout_alignParentLeft="true"属性,另一个按钮有layout_alignParentRight="true"
我想在我的 RelativeLayout 上设置一个背景,在中间显示一个图像。play.9.png我的drawable中有一个并使用以下代码:
<RelativeLayout
android:id="@+id/relativeLayout12"
android:layout_width="fill_parent"
android:layout_height="70dp"
android:background="@drawable/play" // background line
>
<Button
android:id="@+id/bAbout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:text="but1" />
<Button
android:id="@+id/bSync"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:text="but2" />
</RelativeLayout>
但是当我使用背景线时,我会Button错过他们的位置
见下图

但我希望我RelativeLayout是这样的:

怎么了?
