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

前端 未结 4 1620
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:51

    Maybe AnimationDrawable could work for you? EDIT: Not if you want to load from a URL like this post is about. Sorry

    http://developer.android.com/reference/android/graphics/drawable/AnimationDrawable.html

    Depending on the complexity of the GIF i.e. if it is a simple loading/progress indicator you could break the GIF apart, save each image separately and use the Android Framework's AnimationDrawable.

    For simple progress bars this may be less error prone, maybe even more performant.

提交回复
热议问题