AndroidUI design tour-playing gif

Source: Internet
Author: User

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:

  • WAIT_FINISH. This method does not display any images during decoding. After Gif Decoding is complete, the whole Gif animation is displayed.
  • COVER. In this method, only the first frame is displayed during decoding, And the whole gif animation is displayed after all gif Decoding ends.
  • SYNC_DECODER. This method is used to synchronize with decoding, which frame is decoded and which frame is displayed.

    Iii. Project instructions (Version 2.0) Because version 2.0 requires svn, you must export the relevant demo and source code in svn. Svn location:Http: // Gifview.googlecode.com/svn/
    (1) install the svn control. Skip this step if you have already installed it. Not Installed. Click the following URL for a tutorial:
    Address: http://blog.csdn.net/nefuyang/article/details/18549803
    (2) import-> svn-> check out from svn project-> Create a new resource library location-> View the remaining steps
    3.1 check out from svn

    3.2


    3.3



    3.4 The above folders are:

    Trunck: source code

    Demo: demo

Related Article

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.