Android Project Learning essay Eight (Xutils's bitmaputils module)

Source: Internet
Author: User

Xutils's Bitmaputils module:

    • When loading the bitmap, there is no need to consider the phenomenon of the image dislocation when the Oom and the Android container move quickly during the bitmap loading process.
    • Support to load network pictures and local images;
    • The memory management uses the LRU algorithm, better manages the bitmap memory;
    • Configurable line preempted thread count, cache size, cache path, load display animation, etc...
 Public int position) {            new  ImageView (mactivity);            View.setscaletype (SCALETYPE.FIT_XY); // set the picture fill effect to indicate that the            parent form is populated // get Picture link, use link to download picture, set picture to ImageView, consider memory overflow problem, picture local cache             mbitmaputils.display (view, mtopnewslist.get (position). topimage);            Container.addview (view);             return view;        }

Load picture By default (the picture displayed before the Web request picture is downloaded)

 Public Topnewsadapter () {            //  initialize xutils in the Load Picture tool            new  bitmaputils ( mactivity);             // Set the default load picture             mbitmaputils                    . Configdefaultloadingimage (R.drawable.topnews_item_default);        }

Android Project Learning essay Eight (Xutils's bitmaputils module)

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.