Android use GIF to make Start page

Source: Internet
Author: User

The startup page of one of the company's apps wants to be animated GIF, not previously added to the GIF in Android, so hurry hungry!

Objective

We all know ImageView is not the perfect loading GIF format picture, if we in ImageView src specified resources are GIF format, we will be pleasantly surprised to find that the picture will stay in the first frame, that is, there will be no animation effect. Of course, after a few modifications, we can make GIF perfectly loaded on the ImageView.

Body

Android provides us with a movie class that allows us to implement the target of loading GIF format resources. We need to import Android.graphics.Movie This package, of course this is also Android comes with. So our main approach is to inherit a ImageView subclass and load the GIF resource by overwriting the OnDraw method.

Detailed reference

Android App series: perfect for running GIF format ImageView (attached source)

Android Open Source project: gifview--android Display gif animations

Android use GIF to make Start page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.