在新的Google Maps for
Android API v2中,我可以轻松获得自定义标记和信息窗口.但是,我正在尝试在信息窗口中有多个按钮,每个按钮都执行不同的onClick操作,但问题是,该图将InfoWindow视为自己的按钮对象(无论我在InfoWindow上单击什么,都会按整个事情).有谁知道如何自定义这一点?
解决方法
刚刚在
documentation发现.
As mentioned in the prevIoUs section on info windows,an info window
is not a live View,rather the view is rendered as an image onto the
map. As a result,any listeners you set on the view are disregarded
and you cannot distinguish between click events on varIoUs parts of
the view. You are advised not to place interactive components — such
as buttons,checkBoxes,or text inputs — within your custom info
window.