Here, I would like to thank the source code author for his jar package and strongly praise the Open Source spirit.
I. Introduction
Android cannot play GIF images by default, which must be implemented by ourselves.
First we download a ready-made jar package: https://code.google.com/p/gifview/
Note: According to the website, we can see: "The author only updates downloads to 1.1, and later versions to the source, and provides the svn address and related introduction ", first, let's take version 1.1 to introduce how to use the jar package.
2: Project instructions (Version 1.1) download demo address: https://code.google.com/p/gifview/downloads/list
(1) Instructions for use: the above URL has already been clearly stated. I pasted it.
1. Create a New lib directory in your project and put gifview. jar in it.
2. Add a reference to this jar in the compilation path.
3. You can define a GIF view in the layout file, but you can only set a GIF image (setgifimage) in the code)
(2)1.1 adds the following features
Increase the display mode of gif images during decoding. When the gif size is large, decoding takes some time. In this process, you can set three gif display modes: