2011-03-03 104 views
0

在我的應用我有MapView類,我想表現出一個TextView,也是一個按鈕的距離,如何顯示TextView,MapView上的按鈕(重疊在上面)..?

我做this.and試過這種.. http://www.anddev.org/post3452.html#p3452

問題是>>>>

我想說明的TextView和按鈕經過地圖視圖.. 這樣我就可以以全Screen..with其他項目在它的MapView(我們可以看到通過的TextView地圖)..

任何規格需要請在xml文件中完成.. ??

Please..Reply我..謝謝 推進You..in

回答

7

是的,你可以做到這一點。

對於如:

<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:id="@+id/mapView" android:layout_width="fill_parent" 
     android:layout_height="fill_parent" android:enabled="true" 
     android:layout_centerInParent="true" android:clickable="true" 
     android:apiKey="your api key" /> 

    <Button android:layout_width="wrap_content" 
     android:layout_height="wrap_content" android:text="Click" 
     android:layout_alignParentRight="true" 
     android:layout_alignParentBottom="true" android:id="@+id/clickBtn" /> 

</RelativeLayout> 
+0

感謝羅希特和特別Mathew..for Replying..I得到了solution..thanks..I將使用該透明箭標導航太... – Hanry 2011-03-03 10:59:30

0

創建與RelativeLayout的佈局,並在嵌入在地圖視圖。一旦設置,根據需要設置組件的相對位置。