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