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 3.0.3.7 release ready!
Deniel Kerr
Founder. Opencart
Top Partners
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.
Source: https://github.com/koral–/android-gif-drawable.
Your email address will not be published. Required fields are marked*
Name*
Email*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
We use cookies to personalize your experience. By continuing to visit this website you agree to our use of cookies. Learn more about privacy policy
Excellent work, fast, good quality and understood the brief perfectly! Quick responses developing the project and very good cooperation. I suggest to anyone.
Stathis Plakidas
USA
India
Global
Name
Email
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.