- Notifications
You must be signed in to change notification settings - Fork 777
BitmapLibrary
#BitmapLibrary Summary Can whichever View set image(for ImageView set src;other view set background). Used BitmapLibrary, loading bitmap from internet or local SD card, it definitely not out of memory.
It will be widget the size of the bitmap as to decode it. And joined the multi-level cache for bitmap.
defualt make use of MemoryLruCache + DiskLruCache image.
More detailed configuration policies, see the sample code in the repository.
Enjoy it! Any question? You can ask for me: kymjs123(wechat) or [email protected].
##surprise to you You can choose according to their needs, the process of configuring the bitmap loaded. For example: to define their own rules download; animation definition picture shows; the definition of the size of the bitmap to be displayed; custom bitmap is displayed when downloading.
You probably used ImageLoader, BitmapLibrary not so complicated, but at the same time not like ImageLoader use flash inside ListView.
##How to use
KJBitmapkjb = KJBitmap.create(); /** * url can be local sdcard path or internet url; * view can whichever View set image(for ImageView set src;for View set background). */// local sdcard imagekjb.display(imageView, "/storage/sdcard0/1.jpg"); // internet urlkjb.display(textView, http://www.xxx.com/xxx.jpg); //configuration after loading the sizekjb.display(view, http://www.xxx.com/xxx.jpg, 100, 80); //width=100,height=80//configuration bitmap loading ImageView displaykjb.display(view, http://www.xxx.com/xxx.jpg, R.drawable.xxx);kjb.display(view, http://www.xxx.com/xxx.jpg, bitmap);kjb.display(view, http://www.xxx.com/xxx.jpg, drawable);