@Override
 public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
   if (loadedImage != null) {
     ImageView imageView = (ImageView) view;
     boolean firstDisplay = !displayedImages.contains(imageUri);
     if (firstDisplay) {
       FadeInBitmapDisplayer.animate(imageView, 500);
       displayedImages.add(imageUri);
     }
   }
 }
示例#2
0
 @Override
 public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
   // 检测是否已经有了,有了就不在添加动画。
   if (loadedImage != null) {
     ImageView imageView = (ImageView) view;
     boolean firstDisplay = !displayImages.contains(imageUri);
     if (firstDisplay) {
       // Displays image with "fade in" animation
       FadeInBitmapDisplayer.animate(imageView, 500);
       displayImages.add(imageUri);
     }
   }
 }
 @Override
 public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
   if (loadedImage != null) {
     ImageView imageView = (ImageView) view;
     int h = dp2px.dip2px(98);
     int w = h * loadedImage.getWidth() / loadedImage.getHeight();
     FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(w, h);
     // imageView.setLayoutParams(lp);
     imageView.setScaleType(ScaleType.CENTER_CROP);
     boolean firstDisplay = !displayedImages.contains(imageUri);
     if (firstDisplay) {
       FadeInBitmapDisplayer.animate(imageView, 500);
       displayedImages.add(imageUri);
     }
   } else {
     ImageView imageView = (ImageView) view;
     int h = imageView.getHeight();
     FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(h, h);
     lp.setMargins(dp2px.dip2px(10), dp2px.dip2px(10), 0, dp2px.dip2px(10));
     imageView.setLayoutParams(lp);
     imageView.setImageResource(R.drawable.img_default);
   }
 }