I have a .gif file with four frames, i used Ion library for animation but it doesn't show good result. Because this library shows previous frame along with animation. How can i fix that?
Asked
Active
Viewed 6,786 times
1
-
can you post code?you want access gif file in your project? – Aditya Vyas-Lakhan Jan 09 '15 at 04:12
-
Thanks buddy i'm done without using Ion library. I used this http://stackoverflow.com/questions/6533942/adding-gif-image-in-an-imageview-in-android?rq=1 – Mursaleen Jan 09 '15 at 04:39
1 Answers
2
Here is a link to a relevant question Display Animated GIF that has already been answered. Essentially, it says that you can display .gifs with the android.graphics.Movie class. It has been available from API level 1. check out this code linked here https://code.google.com/p/apidemos/source/browse/trunk/ApiDemos/src/com/example/android/apis/graphics/BitmapDecode.java#103 and from line 103 down there is an implementation of it opening an gif resource