可以将固定按钮(带有图像)放在 android map 的顶部。
我想在 android map 上添加按钮,然后当用户单击它时,它会在 map 上执行某些操作。
类似于缩放控件,但始终可见。
最佳答案
将 map 和按钮放在相对布局中。像这样的东西:
<RelativeLayout>
<MapView>
...
</MapView>
<Button>
..make its align parent top property true here
</Button>
</RelativeLayout>
这应该将按钮放在 map 顶部并与屏幕顶部对齐。如果你想要一个带有图像的按钮,请使用 ImageButton insead。
关于android map 固定按钮图像在顶部,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8358170/