public void setImage(final ImageView imageView, String imageUrl, final int resId, int scaleType) {
CacheImageUtil.setCacheImage(imageView, imageUrl, resId, scaleType, getImageLoader());
}
// liuziqiang overload setImage
public void setImage(final ImageView imageView, String imageUrl, int scaleType, final ImageLoadedCallback imgLoadObj) {
CacheImageUtil.setCacheImage(imageView, imageUrl, scaleType, getImageLoader(), imgLoadObj);
}
public void setTouchImage(final ImageViewTouch imageView, String imageUrl, final int resId, int scaleType) {
CacheImageUtil.setTouchImage(imageView, imageUrl, getResources(), resId, scaleType, getImageLoader());
}
public AsyncImageLoader getImageLoader() {
if (mAil == null) {
mAil = new AsyncImageLoader(this);
}
return mAil;
}
public void setImage(final ImageView imageView, final String localFileUri) {
try {
int w = imageView.getWidth();
int h = imageView.getHeight();
if (w < 0) {
w = -1;
}
if (h < 0) {
h = -1;
}
Bitmap bitmap = mAil.getBitMapFromStream(new BitMapInputStream() {
public AnimBean getStartAnim() {
// return new AnimBean(R.anim.slide_in_bottom, R.anim.slide_fix);
return new AnimBean(R.anim.slide_in_right, R.anim.slide_fix);
}
public AnimBean getFinishAnim() {
// return new AnimBean(R.anim.slide_fix, R.anim.slide_out_bottom);
return new AnimBean(R.anim.slide_fix, R.anim.slide_out_right);
}
}