Android-universal-image-loader Architecture Grooming

Source: Internet
Author: User

SOURCE Address: Click to open the link

The extensive use of android-universal-image-loader, we need to study him carefully, for our use, and progress have a lot of help,


From the frame composition, the project is divided into five parts.

1, displayer, display picture module. This part of the main role of displaying pictures, including several ways to display pictures, such as cutting edge display pictures.

By calling display (Bitmap Bitmap, Imageaware imageaware, Loadedfrom loadedfrom);

2, Assist Classes, this part is the helper class module . The main ones are enumeration classes, the queue that holds the task, and some helper classes

3, Imageloader, the main function of this part is to initialize some settings and interface to the user,

4, Displaytask, display the Task module . This class is a thread that is responsible for invoking the display method of Displayer to show the picture

5,loadtask, load the task module . The class is also a thread that is responsible for initiating loading and downloading picture threads.

6, Downloader, download the task module , the module is responsible for downloading, network connection through two ways, one is httpclient, one is HttpURLConnection, the former is a class of Apache encapsulation, Information such as cookies is saved, supporting background services that need to verify user login information, which is not supported, and includes processing when the network is slow and when the network connection fails.

7, cache, caching module, the module includes the local cache and memory cache, the cache size settings in the Imageloader initialization method.

8, Decode, decoding module. This module is the module that decodes the picture, obtains the bitmap according to the InputStream.

So many of the above modules are interface-oriented programming, defining interfaces first, and then adding implementation classes for different business requirements.


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.