android - What is the best way to change color of a custom marker with maps? -


in android app building, have custom markers. shape of these markers circular. on marker click want change color of marker.

following 2 ways come mind:

  1. have 2 external images, 1 unselected mode , 1 selected mode. set unselected image default marker icon , on marker click change marker icon selected mode.
  2. define circle drawable in xml. set drawable icon markers. on marker click change color of drawable.

please suggest best way this?


Comments