// Path: library/src/main/java/com/wuman/androidimageloader/ImageLoader.java
// public static enum LoadResult {
//     /**
//      * Returned when an image was already loaded from memory cache.
//      */
//     OK,
//     /**
//      * Returned when an image needs to be loaded asynchronously, either from
//      * disk cache or from network.
//      * <p>
//      * Callers may wish to assign a placeholder or show a progress spinner
//      * while the image is being loaded whenever this value is returned.
//      */
//     LOADING,
//     /**
//      * Returned when an attempt to load the image has already been made and
//      * it failed.
//      * <p>
//      * Callers may wish to show an error indicator when this value is
//      * returned.
//      * 
//      * @see ImageLoader.Callback
//      */
//     ERROR
// }
// 
// Path: library/src/main/java/com/wuman/androidimageloader/ImageLoader.java
// public static enum LoadSource {
//     /**
//      * Returned when an image was loaded from memory cache.
//      */
//     CACHE_MEMORY,
//     /**
//      * Returned when an image was loaded from disk cache.
//      */
//     CACHE_DISK,
//     /**
//      * Returned when an image was loaded from an external source. The
//      * default is via HttpUrlConnection.
//      */
//     EXTERNAL
// }


import android.graphics.Bitmap;
import android.widget.AbsListView;
import android.widget.AbsListView.OnScrollListener;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.ListAdapter;
import com.nineoldandroids.animation.ObjectAnimator;
import com.nineoldandroids.view.ViewPropertyAnimator;
import com.wuman.androidimageloader.ImageLoader.LoadResult;
import com.wuman.androidimageloader.ImageLoader.LoadSource;
        ViewPropertyAnimator.animate(view).cancel();
        view.setImageDrawable(null);
    }

    @Override
    public void bind(ImageView view, String url) {
        super.bind(view, url);

        // @formatter:off
        if (LOAD_ON_FLING
                && mScrollState == OnScrollListener.SCROLL_STATE_FLING) {
            Bitmap bitmap = mImageLoader.loadOnlyFromMemCache(url);
            if (bitmap != null) {
                view.setImageBitmap(bitmap);
            } else {
                view.setImageResource(mLoadingResource);
            }
        } else 
        // @formatter:on
        {
            LoadResult bindResult = mImageLoader.load(url, new ViewCallback(
                    view));
            if (bindResult == LoadResult.LOADING) {
                view.setImageResource(mLoadingResource);
            }
        }
    }

    @Override
    protected void onImageLoaded(ImageView view, Bitmap bitmap, String url,
// Path: library/src/main/java/com/wuman/androidimageloader/ImageLoader.java
// public static enum LoadResult {
//     /**
//      * Returned when an image was already loaded from memory cache.
//      */
//     OK,
//     /**
//      * Returned when an image needs to be loaded asynchronously, either from
//      * disk cache or from network.
//      * <p>
//      * Callers may wish to assign a placeholder or show a progress spinner
//      * while the image is being loaded whenever this value is returned.
//      */
//     LOADING,
//     /**
//      * Returned when an attempt to load the image has already been made and
//      * it failed.
//      * <p>
//      * Callers may wish to show an error indicator when this value is
//      * returned.
//      * 
//      * @see ImageLoader.Callback
//      */
//     ERROR
// }
// 
// Path: library/src/main/java/com/wuman/androidimageloader/ImageLoader.java
// public static enum LoadSource {
//     /**
//      * Returned when an image was loaded from memory cache.
//      */
//     CACHE_MEMORY,
//     /**
//      * Returned when an image was loaded from disk cache.
//      */
//     CACHE_DISK,
//     /**
//      * Returned when an image was loaded from an external source. The
//      * default is via HttpUrlConnection.
//      */
//     EXTERNAL
// }


// Path: library/src/main/java/com/wuman/androidimageloader/ImageViewBinder.java
import android.graphics.Bitmap;
import android.widget.AbsListView;
import android.widget.AbsListView.OnScrollListener;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.ListAdapter;
import com.nineoldandroids.animation.ObjectAnimator;
import com.nineoldandroids.view.ViewPropertyAnimator;
import com.wuman.androidimageloader.ImageLoader.LoadResult;
import com.wuman.androidimageloader.ImageLoader.LoadSource;

        ViewPropertyAnimator.animate(view).cancel();
        view.setImageDrawable(null);
    }

    @Override
    public void bind(ImageView view, String url) {
        super.bind(view, url);

        // @formatter:off
        if (LOAD_ON_FLING
                && mScrollState == OnScrollListener.SCROLL_STATE_FLING) {
            Bitmap bitmap = mImageLoader.loadOnlyFromMemCache(url);
            if (bitmap != null) {
                view.setImageBitmap(bitmap);
            } else {
                view.setImageResource(mLoadingResource);
            }
        } else 
        // @formatter:on
        {
            LoadResult bindResult = mImageLoader.load(url, new ViewCallback(
                    view));
            if (bindResult == LoadResult.LOADING) {
                view.setImageResource(mLoadingResource);
            }
        }
    }

    @Override
    protected void onImageLoaded(ImageView view, Bitmap bitmap, String url,
            LoadSource loadSource) {