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