I want to achieve a marker animation such as GIF animation. I got two images which should be blinking simultaneously. I found nothing which can acheive this in android. I am
Please help me what I am doing wrong
You are modifying an object that is no longer being used. Once addMarker()
is called, the MarkerOptions
object has no further meaning, yet this is what you are modifying via your postDelayed()
logic.
(BTW, you don't need a Handler
, as postDelayed()
is available on any View
)
addMarker()
returns a Marker
. You will need to work with that Marker
to affect your changes, via setIcon()
.
Also, since your bitmaps are not changing, I suggest caching your two BitmapDescriptor
objects, rather than re-creating them on every pass.