Android Three-step display GIF animated picture

Source: Internet
Author: User

Today brings you a class library that shows animated GIF images in a simple, three-step way.

1. Add Gifview.jar to your project.

2. In the layout XML, write this:

<com.ant.liao.gifview android:id= "@+id/gif1" android:layout_height= "wrap_content" android:layout_width= "Wrap_ Content "android:paddingtop=" 4px "android:paddingleft=" 14px "android:enabled=" false "/>

3. In the activity, write this:

Gifview GF1 = (gifview) Findviewbyid (R.ID.GIF1); Gf1.setgifimage (r.drawable.gif);//gif is the animated GIF image you want to load


Report:

Demo Apk:http://pan.baidu.com/s/1c01s7gs

Demo Source: Http://pan.baidu.com/s/1bnB4bSz


You are welcome to focus on the Android developer community Public number, the official will not regularly bring you some Android development Quality trial demo or framework, improve the development efficiency of everyone, to provide you with quality assurance of Android demo source.

Scan QR Code attention:


Android Three-step display GIF animated picture

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.