Android-BitmapCache v2.1Thu, Jan 24, 12:00 AM
Android-BitmapCache has version 2.1! Hopefully by now you should have heard about Android-BitmapCache (if you haven’t, have a look at this post here).
Since starting development on the library, I’ve been aware that the requirement of making the usage of the library as seamless and easy as possible. The main problem is the need for a custom ImageView class. Unfortunately, there is no reliable way to be notified of when a Drawable is being used, so the need for CacheableImageView remains.
So for this release I’ve been concentrating on other parts of the library:
- All reference counting function has been moved to the new CacheableBitmapDrawable. This means that you have direct access to all of BitmapDrawable’s function, while staying within the confines of caching.
- Force access to the disk cache to be completed on a worker/background thread.
- Update to v1.3.1 of DiskLruCache.
- New version of put() and get() which allow you to specify BitmapFactory.Options decode options.
- New contains*() methods.
- Fix race condition which means that a Bitmap is recycled too early.
- CacheableBitmapWrapper still exists but is simply a deprecated ‘dumb’ sub-class of CacheableBitmapDrawable to aid migration.
You can get it from GitHub: