Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Kevin Nguyen
77 PointsSending gif and making them move.
How do I send a gif and have the other person read it in my ribbit app? I want to be able to watch the gif file move.
1 Answer
Harry James
14,780 PointsHey Kevin!
Sorry about my late reply - I've been extremely busy with exams lately.
Gifs aren't actually supported in Android (In fact, they're discouraged) and so, using them is quite troubling...
My approach if I was to use gifs would be to convert the gif to individual frames where you could then use an AnimationDrawable.
The complicated part is the conversion from gif to individual frames - after that it's a breeze.
If you do want to do this conversion, it has great complexity and so I'd recommend you look for an open-source library designed to do this conversion. I also recommend you take a look at this tutorial if you're really interested in getting gifs working. Note is is still very complicated and that you have to deal with I/O streams even with an open-source library.
Anyhow, if you do get stuck, I will try my best to help but I personally have never used gifs in an application before so I don't have the best of knowledge!