Android Google Map V2: How to change previous clicked marker's icon when clicked on another marker
Finally I found the best and most simple way. I made a previousMarker object and store the current clicked marker:
@Override
public boolean onMarkerClick(Marker marker) { //Called when a marker has been clicked or tapped.
if(previousMarker!=null){
previousMarker.setIcon(BitmapDescriptorFactory.fromResource(R.drawable.dot_icon));
}
marker.setIcon(BitmapDescriptorFactory.fromResource(R.drawable.ct_icon));
previousMarker=marker; //Now the clicked marker becomes previousMarker
return false;
}