2011-11-01 30 views
1

我想在谷歌地圖下面設置按鈕意味着按鈕應該在屏幕和谷歌地圖的底部,直到剛好在按鈕上方,我無法設置谷歌地圖的傾角高度,因爲那樣會創建大屏幕還是小屏幕上的問題...如果我設置的GoogleMap = WRAP_CONTENT的高度則無法看到地圖在我的佈局,然後我應該怎麼辦?我的XML如下...谷歌地圖下面的設置按鈕佈局android

<?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 
    android:clickable="true" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:id="@+id/map" 
android:enabled="true" 
android:layout_below="@id/imv" 
android:apiKey="xyz...." 
/> 
    <Button 

    android:text="Map View" 
    android:id="@+id/button" 

    android:layout_width="fill_parent" 
    android:layout_height="30dip" 
     android:drawableTop="@drawable/icomapon" 
    android:background="@drawable/navigationbar" 
    android:layout_alignParentBottom="true"/> 
    </RelativeLayout> 

回答

3

剛加入下面的標籤MapView

android:layout_above="@+id/button" 
+1

實際上,我已經做到了這一點後,我看到你的解決方案...任何方式謝謝.. 。它的作品... chears .. + 1 – shyam

+1

很高興聽到這個 – ingsaurabh

+0

@saurabhtrivedi哪個問題的鏈接 – ingsaurabh