Android: How do a display a large animated gif given a url?

前端 未结 4 1616
Happy的楠姐
Happy的楠姐 2020-12-05 11:08

Suppose I have the URL for large animated gif and I wanted to make a youtube like activity that displays the animation in a streaming way. How do I

  1. stream in
4条回答
  •  感情败类
    2020-12-05 11:46

    Glide prove most easy and efficient way to achieve this with just one line of code :-

    Glide.with(getApplicationContext())
                .load(Uri.parse("https://media1.giphy.com/media/5ziaphcUWGKPu/200.gif"))
                .asGif().placeholder(R.drawable.ic_launcher).crossFade()
                .into(imageView);
    

    Result is here :-

    Gif taken from here http://giphy.com/search/big-gif/3

    Add jar from here :- https://github.com/bumptech/glide/releases

提交回复
热议问题