android - 单击 InfoWindows 的突出显示时禁用?

标签 android android-maps-v2

在新的 Mapsv2 Api for Android 中,有什么方法可以禁用用户点击 InfoWindow 时出现的高亮效果吗?

这是 getIfoContent()getInfoWindow() 方法的问题。使用 getInfoWindow() 突出显示文本。

最佳答案

简单地说“你不能”。

因为根据文档“信息窗口不是实时 View ,而是将 View 作为图像呈现在 map 上。因此,您在 View 上设置的任何监听器都将被忽略,并且您无法区分点击事件 View 的各个部分。建议您不要在自定义信息窗口中放置交互式组件,例如按钮、复选框或文本输入。”

所以,简而言之,除了“OnInfoWindowClickListener”之外,你无法处理信息窗口上的任何事件

更多请查看“https://developers.google.com/maps/documentation/android/marker”。

关于android - 单击 InfoWindows 的突出显示时禁用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14772698/

相关文章:

android - GoogleMap 对象的 NullPointerException

android - 标记位置更改事件

android - 无法将 WebViewFragment 派生类添加到 FragmentTransaction

android - 谷歌地图V2的亮度很低

android - 如何使用 JsonArray 的 gson 创建模型类,其中数组是变量而不是常量 android

android - ViewPager 和更新 Fragments

android - 无法在 Android 中获取新的 GPS 位置

Android 依赖问题

android - TensorFlow Lite 和 Android Things - 定位检测到的对象并将它们存储在 RectF 对象中?

android - 如何在android中将webview内容居中