2012-01-31 82 views
0

我打算在地图下方放置地图视图。图像被定义为线性布局的背景。我将如何能够这样做?目前,地图视图位于布局的顶部并覆盖图像的一部分。地图地图视图以上线性布局

我的代码如下:

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@+id/address_view" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:background="@drawable/pocket_one_map"> 

    <RelativeLayout 
     android:id="@+id/relativeLayout1" 
     android:layout_width="300dp" 
     android:layout_height="450dp" android:layout_gravity="center" 
     android:layout_marginLeft="10dp"> 

    <com.esri.android.map.MapView  
    android:id="@+id/map" android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    initExtent = "-200.6 20672.6 25000.4 52887.4"> 

    </com.esri.android.map.MapView> 

    </RelativeLayout> 

</LinearLayout> 

任何帮助,将好心赞赏。谢谢。

回答

0

乘坐,并在其中采取并设置它下面 这样

<RelativeLayout 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content"> 

     <ImageView 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:background="img"/ > 

<com.esri.android.map.MapView  
    android:id="@+id/map" android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    initExtent = "-200.6 20672.6 25000.4 52887.4"> 

    </com.esri.android.map.MapView> 

    </RelativeLayout>