Android Imageloader Confusion loading solution for drawable black picture appearing

Source: Internet
Author: User

On the internet for a long time, did not find, and later read the source to know ...

Multi-threaded asynchronous loading and display of pictures (pictures from the network, SD card, assets folder, drawable folder (cannot load 9patch), new add video thumbnail image)

String Imageuri = "Http://site.com/image.png";      // From Web   String Imageuri = "File:///mnt/sdcard/image.png";   // From SD card   // From content provider   String Imageuri = "Assets://image.png";             // From assets   // From Drawables (only images, Non-9patch)  

The use of the time is also very simple, we only need to give each picture source place with scheme package (except Content provider), and then as the URL of the picture passed to Imageloader, The Universal-image-loader framework gets the input stream according to different scheme

        The image comes from content provider        String contentprividerurl = "CONTENT://MEDIA/EXTERNAL/AUDIO/ALBUMART/13";                 Image from ASSETS        String assetsurl = ImageDownloader.Scheme.ASSETS.wrap ("Image.png");                 The image is from        String drawableurl = ImageDownloader.Scheme.DRAWABLE.wrap ("R.drawable.image");        

  

Hope to help everyone.

Android Imageloader Confusion loading solution for drawable black picture appearing

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.