Android 在地图片段中添加按钮?

Android 在地图片段中添加按钮?,android,android-fragments,Android,Android Fragments,我在谷歌地图V2上工作,我想拍一张照片 将搜索栏从顶层移动到左侧的内部片段 我做了一些尝试,但没有采取行动:( 你能帮我吗 照片是 ========= XML文件 <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/too

我在谷歌地图V2上工作,我想拍一张照片

将搜索栏从顶层移动到左侧的内部片段

我做了一些尝试,但没有采取行动:(

你能帮我吗

照片是

=========

XML文件

 <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="#ffffff"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin" >

<LinearLayout
    android:id="@+id/topLayout"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:orientation="horizontal" >

    <EditText
        android:id="@+id/editText1"
        android:layout_width="wrap_content"
        android:layout_height="36dp"
        android:hint="@string/search"
        android:textColorHint="#c7c7c7"
        android:width="250dp" />

    <Button
        android:id="@+id/button1"
        android:layout_width="match_parent"
        android:layout_height="fill_parent"
        android:onClick="geoLocate"
        android:padding="0dp"
        android:paddingBottom="0dp"
        android:background="#359c5e"
        android:text="@string/go"
        android:textColor="#ffffff" />
</LinearLayout>

<fragment
    android:id="@+id/map"
    android:name="com.google.android.gms.maps.SupportMapFragment"
    android:layout_width="fill_parent"
    android:layout_height="match_parent"
    android:layout_above="@+id/belowlayout"
    android:layout_below="@id/topLayout"
    android:layout_marginTop="7dp" />

<RelativeLayout
    android:id="@+id/belowlayout"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:orientation="horizontal" >

    <Button
        android:id="@+id/button7"
        android:layout_width="100dp"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_gravity="right|center_horizontal"
        android:background="#359c5e"
        android:layout_marginBottom="14dp"
        android:layout_marginLeft="8dp"
        android:layout_marginTop="14dp"
        android:text="Next"
        android:textColor="#ffffff" />
</RelativeLayout>

试试这个

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="#ffffff"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin" >



<fragment
    android:id="@+id/map"
    android:name="com.google.android.gms.maps.SupportMapFragment"
    android:layout_width="fill_parent"
    android:layout_height="match_parent"
    android:layout_above="@+id/belowlayout"
    android:layout_marginTop="7dp" />

<RelativeLayout
    android:id="@+id/belowlayout"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:orientation="horizontal" >

    <Button
        android:id="@+id/button7"
        android:layout_width="100dp"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_gravity="right|center_horizontal"
        android:background="#359c5e"
        android:layout_marginBottom="14dp"
        android:layout_marginLeft="8dp"
        android:layout_marginTop="14dp"
        android:text="Next"
        android:textColor="#ffffff" />



</RelativeLayout>

<LinearLayout
    android:id="@+id/topLayout"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignBottom="@+id/belowlayout"
    android:layout_alignLeft="@+id/map"
    android:layout_marginBottom="40dp"
    android:orientation="horizontal" >

    <EditText
        android:id="@+id/editText1"
        android:layout_width="wrap_content"
        android:layout_height="36dp"
        android:layout_marginBottom="30dp"
        android:layout_weight="1"
        android:hint="search"
        android:textColorHint="#c7c7c7"
        android:width="250dp" />

    <Button
        android:id="@+id/button1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="30dp"
        android:layout_weight="1"
        android:background="#359c5e"
        android:onClick="geoLocate"
        android:padding="0dp"
        android:paddingBottom="0dp"
        android:text="go"
        android:textColor="#ffffff" />
</LinearLayout>

</RelativeLayout>