universal-ImageLoader加载图片

/**
 * Created by GRR on 2015/12/9.
 */
public class ImageLoadUtil {

    public static void loadImage(final String imgUrl, final ImageView imageView) {

        ImageLoader.getInstance().displayImage(imgUrl, imageView, new ImageLoadingListener() {
            @Override
            public void onLoadingStarted(String s, View view) {
            }
            @Override
            public void onLoadingFailed(String s, View view, FailReason failReason) {
            }
            @Override
            public void onLoadingComplete(String s, View view, Bitmap bitmap) {
                if (bitmap!=null){
                    imageView.setImageBitmap(bitmap);
<span id="transmark"></span>
                }
            }
            @Override
            public void onLoadingCancelled(String s, View view) {

            }
        });
    }
}

你可能感兴趣的:(universal-ImageLoader加载图片)