2012-01-31 84 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>