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. 使用地图叠加和GeoPoints在地图视图上的Android绘图路径
- 3. 如何在所有视图之上叠加窗口图像?
- 4. 如何在iPhone的相机视图上叠加图像?
- 5. 如何在Google地图上叠加SVG图表?
- 6. 如何在Google地图上旋转叠加图像?
- 7. 如何在iOS上堆叠子视图?
- 8. 第二层地图视图上的叠加
- 9. 在Android上平铺地图叠加层
- 10. iphone视图叠加
- 11. 在Android 2.1上的Google地图上创建动态(视频)叠加图
- 12. 在所有其他视图上添加重叠视图
- 13. 如何在现有视图顶部叠加图标图像
- 14. 如何在现有视图顶部叠加图标图像
- 15. 如何在openlayers中添加地图图层叠加层?
- 16. 如何在xsl-fo上叠加图像?
- 17. 如何在图库上叠加imageview?
- 18. 如何在网格上叠加图像?
- 19. 在Google地图上添加自定义图案叠加层
- 20. 如何在模态视图上放置UIView叠加层?
- 21. 如何在视图上创建叠加层
- 22. 如何在ImagePickerController()中的叠加视图上识别TapGesture?
- 23. 如何在Highmaps上叠加两种世界地图
- 24. 如何在屏幕上绘制多个地图叠加层?
- 25. 如何在地图上控制我的逐项叠加?
- 26. 如何在谷歌地图上绘制线条叠加Android
- 27. 如何使叠加显示上述canvas.drawLine在Android的地图API
- 28. 如何检测视图上的重叠?
- 29. 添加倒圆叠加到地图视图
- 30. 的UIScrollView使用上叠加的视图
先谢谢您的回复,可能是我还不够清楚:我不想添加overlayitem (标记),但一个视图(按钮,文本视图..)并将它们放置在地图上,这样它们就会移动,如果我为mapview设置动画 –
检查更新后。顺便说一下,我认为不需要使用叠加添加按钮或视图,您可以使用与地图上的标记相同的叠加和显示按钮图像,以便它可以在地图上移动 – Pratik