CWAC Thumbnail: Images in Lists, Without the Wait
THIS PROJECT IS DISCONTINUED — USE AT YOUR OWN RISK
So you want to have a
ListView that, among other things,
displays thumbnail images off the Internet. Doing that in
a performant fashion is a pain, since you have to do the
HTTP requests in the background so as not to tie up the UI
thread. Matching those requests up to their corresponding
ImageViews -- and only for those rows presently visible --
is quite annoying.
Unless you use
ThumbnailAdapter handles all of that mess for you. All you
need to do is wrap your regular
ListAdapter in a
SimpleWebImageCache (from the CWAC Cache module)
and the IDs of the
ImageViews in each row. Then, when you bind
your rows, tuck the URL for the image into the
ThumbnailAdapter handles the rest.
Full instructions for using this module are forthcoming. Stay tuned!
This project requires the CWAC Task module, the
CWAC Bus module, CWAC AdapterWrapper,
and the CWAC Cache module.
A copy of compatible JARs can be found in the
of the project, though you are welcome to try newer ones, or
ones that you have patched yourself.
This is version 0.1 of this module, meaning it is pretty darn new.
com.commonsware.cwac.thumbnail.demo package you will find
a sample activity that demonstrates the use of
Note that when you build the JAR via
ant jar, the sample
activity is not included, nor any resources -- only the
compiled classes for the actual library are put into the JAR.
The code in this project is licensed under the Apache Software License 2.0, per the terms of the included LICENSE file.
THIS PROJECT IS UNSUPPORTED