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)