help with eclipse debugging /or/ subclassed SimpleAdapter not calling setViewImage()

Posted by edzillion on Stack Overflow See other posts from Stack Overflow or by edzillion
Published on 2010-04-28T23:25:08Z Indexed on 2010/04/29 19:07 UTC
Read the original article Hit count: 346

Filed under:
|
|

Hi

I was following the method for asynchronously loading images into a listview as outlined in evan charlton's blog here. The problem I am having is that the setViewImage function is not being called by the system:

@Override
public void setViewImage(final ImageView image, final String value) {
    if (value != null && value.length() > 0 && image instanceof RemoteImageView) {
        RemoteImageView riv = (RemoteImageView) image;
        riv.setLocalURI(API.getCacheFileName(value));
        riv.setRemoteURI(value);
        super.setViewImage(image, R.drawable.icon);
    } else {
        image.setVisibility(View.GONE);
    }
}

I have built his example code, and setViewImage is called fine - it seems to me that the code is functionally identical. Looking into the docs it says:

First, if a SimpleAdapter.ViewBinder is available, setViewValue(android.view.View, Object, String) is invoked. If the returned value is true, binding has occured. If the returned value is false and the view to bind is a TextView, setViewText(TextView, String) is invoked. If the returned value is false and the view to bind is an ImageView, setViewImage(ImageView, int) or setViewImage(ImageView, String) is invoked. If no appropriate binding can be found, an IllegalStateException is thrown.

I don't really understand how to debug (in eclipse) to find out how this process is occuring, advice on how to do so would be a help. Thanks.

© Stack Overflow or respective owner

Related posts about android

Related posts about eclipse