简体   繁体   中英

Show a gif animation

Ok so first let me say that I searched everywhere in the internet, even here, and I can't find the answer, so I have no code to show. I am just trying to make a gif animation in an app playing all the time, how can I do it, SurfaceView, Movie, what? Please explain me with sample code

PS As I said I searched EVERYWHERE! So PLEASE, if you are going to send me warnings or stuff, just delete my thread.....

I did it, instead of animation = (AnimationDrawable) img.getBackground(); it should've been animation = (AnimationDrawable) img.getDrawable();

the weird thing is that in the Android documentation in http://developer.android.com/guide/topics/graphics/drawable-animation.html the example was with getBackground...... anyone knows why?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM