3

I'm trying to build an app which displays .jpg, .png, .webm and .gif (also animated) in a ListView from a URL. I receive the URL via a JSON request. I managed to receive the JSON response and the Image/WebM/Gif URL via Volley and tried to display it via ImageLoader in a NetworkImageView. JPG and PNG work fine but WebM and Gif wont playback. WebM wont even show a frame as Gif does (first frame only). Then I tried it with Picasso and a normal ImageView. Same results. JPG and PNG work but the other two wont. Does anybody have an idea how I can load WebM and Gif form a URL to a ImageView or NetworkImageView which later will be inside a ListView?

I thought about using WebView but as I dont have much experience with it I don't really know if it's good for the performance to have multiple WebViews in a ListView.

I hope somebody has an idea. Thanks in advance.

  • According to [this answer](http://stackoverflow.com/a/22862991/2111834), you can use Glide, thought I'm not sure WebM will also work. See if it meets your criteria :) – Edwin Lambregts Apr 22 '15 at 14:12
  • Have you tried "Ion"? It loads Images and Gifs without problem (both in ImageView). Though I'm looking for a solution to also loads .webm files / gifv's – Christian Strang May 06 '15 at 13:39

1 Answers1

0

For the animated gif images, I would recommend the android-gif-drawable library. The included GifImageView is behaving like a normal ImageView but supports animated gifs.

To display the webm video a VideoView should work.

agrajag
  • 451
  • 1
  • 4
  • 13
  • I tried using GifImageView it doesn't change anythign. Could it be that Picasso doesn't actually load the Gif? So the GifImageView can't playback? –  Apr 22 '15 at 14:14
  • How do you pass the gif from Picasso to GifImageView? – agrajag Apr 22 '15 at 14:48
  • I just load the gif URL. Same as if it would be a JPG or PNG. –  Apr 22 '15 at 17:52