使用相对布局在图像上插入按钮.
你的图像应该在RelativeLayout的背景标签中给出.
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="50dp"
android:background="@drawable/list_nav"
>
<Button
android:layout_width="63dp"
android:layout_height="36dp"
android:id="@+id/mapbutton"
android:layout_marginTop="7dp"
android:layout_marginLeft="4dp"
android:layout_alignParentLeft="true"
/>
Run Code Online (Sandbox Code Playgroud)
这个例子在图像的左侧添加了按钮,因为我使用了layout_alignParentLeft ="true"
| 归档时间: |
|
| 查看次数: |
1740 次 |
| 最近记录: |