2011-11-01 64 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