Android App Development
iOS App Development
Flutter App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 184.108.40.206 release ready!
Updated 23 December 2016
I stuck at a situation last week where I want to show a continuously animating background to my android application. The first option that stuck my head was the Animated .SVG files (For all of you wondering what it is you can have a look here). But after working on it for sometime I quit as my animation is quite impossible with animated .SVG, as I have to apply the animation to each and every element and my requirement was quite large too.
So after so much of effort I switch to a much easier way, which I probably do every-time, I moved to .gif. But as you know the android doesn’t have a view for applying .gif so I Google and found the library that can do it for me and the one suits my requirement. The library is android-gif-drawable. The library has its own custom views, in them if you pass a .gif they will show it in your android application. It is very simple just make your layout XML as
The drawable snowfall.gif is present in the res/drawable folder. The library detects itself weather the drawable provided is a .gif file or any other file and then handles it accordingly.
Warning: GIF files are heavier so don’t try to send it via network as it can take forever to download. Also as they are heavier to load to it can cause the OutOfMemoryError on some devices. In my case the file is present inside the application and I made sure my activity takes lesser memory so that there would be enough space for GIF file to load. So test on different devices before using the library.
Your email address will not be published. Required fields are marked*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.