GIF type animation for marker in google map api ANDROID

后端 未结 1 1148
终归单人心
终归单人心 2020-12-16 19:00

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

相关标签:
1条回答
  • 2020-12-16 19:30

    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.

    0 讨论(0)
提交回复
热议问题