Android imageloader third party framework parsing

This example shares the usage of Android imageloader framework for your reference. The specific contents are as follows

1. Preparation

1) Import universal-image-loader-1.9 5. Jar into the project

2) Create myapplication, inherit application, and initialize imageloader in oncreate()

2.ImageLoader_ Used in listview

5) Initialize displayimageoptions 6) get the imageloader instance 7) display the loaded picture

3.ImageLoader_ Use in viewpager

3. Imageloader memory overflow solution

1) Reduce the number of threads in the thread pool and configure them in (. Threadpoolsize) in imageloaderconfiguration. It is recommended to configure 1-5. 2) In the displayimageoptions option, configure bitmapconfig to bitmap Config. RGB_ 565, because the default is ARGB_ 8888, using RGB_ 565 will be better than using ARGB_ 8888 consumes twice less memory. 3) Configure the memory cache of pictures in imageloaderconfiguration as memorycache (New weakmemorycache()) or do not use memory cache. 4) Set in the displayimageoptions option Imagescaletype (imagescaletype. In_sample_int) or imagescaletype (imagescaletype. Actual).

The above is the whole content of this article. I hope it will be helpful to your study, and I hope you can support programming tips.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>