Custom Picture Albums

Source: Internet
Author: User

1. The open source framework image-cache-master a generic URI to specify whether local and network files http:///file:///

2. Similar Contentresolver.scheme_android_resource + "://" +r.getresourcepackagename (r.drawable.icon_photograph) + "/" + R.getresourcetypename (r.drawable.icon_photograph) + "/"

+ R.getresourceentryname (r.drawable.icon_photograph)

The local drawable needs to modify the framework Image-cache-master because the framework supports only file or HTTP

3.image-cache-master use JPG By default, you will find that the picture has a black background changed to Compressformat.png.

4. In order to be more humane, the small figure by default in XML using Scaletype.center, large map through code to determine the use of Scaletype.fit_center in Imageloaderadapter onimageloaded method to write code judgment

if (Iv.getdrawable (). Getintrinsicheight () >iv.getheight () | | Iv.getdrawable (). Getintrinsicwidth () >iv.getwidth ())            {                iv.setscaletype (scaletype.fit_center);            }

Custom Picture Albums

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.