Dynamic contents in Maps V2 InfoWindow
Solution 1:
You should be doing Marker.showInfoWindow()
on marker that is currently showing info window when you receive model update.
So you need to do 3 things:
- create model and not put all the downloading into
InfoWindowAdapter
- save reference to Marker (call it
markerShowingInfoWindow
)
fromgetInfoContents(Marker marker)
- when model notifies you of download complete call
if (markerShowingInfoWindow != null && markerShowingInfoWindow.isInfoWindowShown()) {
markerShowingInfoWindow.showInfoWindow();
}
Solution 2:
I did something similar. This was still giving me the recession error
if (markerShowingInfoWindow != null && markerShowingInfoWindow.isShowingInfoWindow()) {
markerShowingInfoWindow.showInfoWindow();
}
So what i did was simply closes the window and open it again
if (markerShowingInfoWindow != null && markerShowingInfoWindow.isShowingInfoWindow()) {
markerShowingInfoWindow.hideInfoWindow();
markerShowingInfoWindow.showInfoWindow();
}
for a better detail version of the same answer here is my original soultion LINK