Using an Animated Gif as Ground Overlays in G. Maps v2

前端 未结 3 976
终归单人心
终归单人心 2021-02-19 13:28

I am currently using Google Maps and would like to use an animated Gif as Overlay in my app. This is really frustrating as it seems very easy on iOS version of the app, SO I rea

3条回答
  •  悲&欢浪女
    2021-02-19 14:05

    You can use open source library to display Gif image in a single imageview just add its dependency https://github.com/bumptech/glide

    and Its easy to use this an example code

    ImageView imageView = (ImageView) findViewById(R.id.imageView);
    GlideDrawableImageViewTarget imageViewTarget = new GlideDrawableImageViewTarget(imageView);
    Glide.with(this).load(R.raw.sample_gif).into(imageViewTarget);
    

提交回复
热议问题