1
A
回答
1
您可以像這樣創建RelativeLayout。
這裏是例子。
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent">
<com.google.android.maps.MapView
xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/mapview"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:clickable="true" android:apiKey="you key" />
<ImageView android:id="@+id/cur_loc" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:src="@drawable/cur_loc"
android:visibility="gone" android:padding="0dip"
android:layout_margin="0dip" android:background="#ffffff" />
<LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/track_dist_linear"
android:background="#ffffff" android:orientation="vertical">
<TextView android:id="@+id/txt_msg" android:layout_width="fill_parent" android:layout_height="wrap_content"
android:textColor="#000000" android:text="Distance 0 km"/>
<TextView android:id="@+id/speed_msg" android:layout_width="fill_parent" android:layout_height="wrap_content"
android:textColor="#000000" android:text="Speed 0 kmph \ntime 0 sec"/>
</LinearLayout>
<LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_below="@+id/track_dist_linear">
<Button android:id="@+id/track_btn" android:text="Start" android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<Button android:id="@+id/show_track_btn" android:text="Show" android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
</RelativeLayout>
0
相關問題
- 1. 如何在默認Google地圖上添加疊加地圖?
- 2. 在地圖視圖上重新添加疊加層iOS
- 3. 使用地圖疊加和GeoPoints在地圖視圖上的Android繪圖路徑
- 4. 添加視圖疊加在ImageCardView上
- 5. 如何在所有視圖之上疊加窗口圖像?
- 6. 如何在iPhone的相機視圖上疊加圖像?
- 7. 如何在地圖上製作動畫疊加圖釘Android
- 8. 如何在Google地圖上疊加SVG圖表?
- 9. 如何在Google地圖上旋轉疊加圖像?
- 10. 如何在散點圖上整齊地疊加線圖系列?
- 11. 如何在iOS上堆疊子視圖?
- 12. 第二層地圖視圖上的疊加
- 13. 在Android上平鋪地圖疊加層
- 14. 在地圖視圖中添加自定義疊加
- 15. 在圖庫視圖中疊加圖像?
- 16. iPad:如何在主細節窗口上添加疊加視圖?
- 17. 如何在Android上添加疊加地圖?
- 18. 如何在地圖疊加上添加註釋ios
- 19. 如何將多個圖像疊加到谷歌地圖上
- 20. 在Android 2.1上的Google地圖上創建動態(視頻)疊加圖
- 21. iphone視圖疊加
- 22. 如何在現有視圖頂部疊加圖標圖像
- 23. 如何在現有視圖頂部疊加圖標圖像
- 24. 在所有其他視圖上添加重疊視圖
- 25. 在自定義視圖上疊加編輯視圖
- 26. 如何在openlayers中添加地圖圖層疊加層?
- 27. 如何在xsl-fo上疊加圖像?
- 28. 如何在圖庫上疊加imageview?
- 29. 如何在網格上疊加圖像?
- 30. 如何在C#中將圖像疊加或疊加到視頻上#
先謝謝您的回覆,可能是我還不夠清楚:我不想添加overlayitem (標記),但一個視圖(按鈕,文本視圖..)並將它們放置在地圖上,這樣它們就會移動,如果我爲mapview設置動畫 –
檢查更新後。順便說一下,我認爲不需要使用疊加添加按鈕或視圖,您可以使用與地圖上的標記相同的疊加和顯示按鈕圖像,以便它可以在地圖上移動 – Pratik