Reference: http://www.ibm.com/developerworks/cn/opensource/os-cn-android-anmt1/index.html
 
 
 
Refer to the example in COM. example. Android. APIs. Graphics bitmapdecode. Java in apidemos.Code.
 
It uses the movie class to read and decode GIF files.
This example code calls invalidate in ondraw to repeatedly invalidate the view so that the system calls
The ondraw function of sampleview. If you select which frame of image to draw, it is passed to the current system time to movie.
Class, and then let it select the frame image according to the time sequence. The method that repeatedly invalidates a view consumes resources. If the rendering effect permits, you can reduce the CPU usage by using the method that invalidates the view with latency.
Consumption.
 
Currently, screenshots are displayed when you use this method to play GIF animations. This is because libgif is used in Android.
The library is an old version, and the new tag is not supported, so the screen is blurred. The solution is to avoid using too new tags when creating GIF images or improving the corresponding android
Libgif Library