Android 带按钮的图像-位于谷歌地图上方

Android 带按钮的图像-位于谷歌地图上方,android,image,map,android-relativelayout,Android,Image,Map,Android Relativelayout,我想在地图上方添加一个图像,上面有两个按钮。我怎样才能做到这一点? 这就是我想要在Android中实现的目标 试试这段代码。它将使用RelativeLayout在地图视图上放置按钮 <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_paren

我想在地图上方添加一个图像,上面有两个按钮。我怎样才能做到这一点?
这就是我想要在Android中实现的目标

试试这段代码。它将使用RelativeLayout在地图视图上放置按钮

<?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">
    <com.google.android.maps.MapView
        xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/mapview"
        android:layout_width="fill_parent" android:layout_height="fill_parent"
        android:clickable="true" android:apiKey="your_id" />
    <Button android:layout_below="@+id/mapview"
        android:text="@+id/Button03"
        android:id="@+id/Button01"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentBottom="true"/>
    <Button android:layout_below="@+id/mapview"
        android:text="@+id/Button02"
        android:id="@+id/Button02"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_alignParentBottom="true"/>
    <Button android:text="@+id/Button03"
        android:id="@+id/Button03"
        android:layout_width="wrap_content"
        android:layout_toLeftOf="@+id/mapview"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_alignParentBottom="true"/>
</RelativeLayout>

检查此链接:

您可以通过添加标题栏/视图来实现这一点,例如,使用该图像作为标题视图的背景:

<RelativeLayout
    android:id="@+id/headerlayout" 
    android:layout_width="fill_parent"
    android:layout_height="wrap_content" android:layout_alignParentTop="true"
    android:layout_alignParentLeft="true"
    android:background="drawable_image/color(Whatever u want)"
    >

    <Button android:id="@+id/one" android:layout_width="wrap_content"
        android:layout_height="wrap_content" android:layout_alignParentTop="true"
        android:layout_alignParentLeft="true" android:text="one">
    </Button>

     <Button android:id="@+id/two" android:layout_width="wrap_content"
        android:layout_height="wrap_content" android:layout_alignParentTop="true"
        android:layout_alignParentRight="true" android:text="two">
    </Button>
</RelativeLayout>

<MapViewActivity
    xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/mapview"
    android:layout_width="wrap_content" android:layout_height="wrap_content"
    android:clickable="true" android:apiKey="your map key"
    android:layout_below="@+id/headerlayout"

    />

你的问题不清楚..你想要什么?你想在图片中添加图片的地方???@顶部--->——概述(概述是图片,编辑和开始是按钮),我想在这张图片上添加按钮。