Skip to content

Commit

Permalink
兼容Glide4.3.0
Browse files Browse the repository at this point in the history
兼容Glide4.3.0
  • Loading branch information
zoubo authored Mar 20, 2018
1 parent dd10f5e commit d94a9d7
Showing 1 changed file with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,17 +104,17 @@ private void setColumnNumber(Context context, int columnNumber) {

boolean canLoadImage = AndroidLifecycleUtils.canLoadImage(holder.ivPhoto.getContext());

if (canLoadImage) {
glide
.load(new File(photo.getPath()))
.centerCrop()
.dontAnimate()
.thumbnail(0.5f)
.override(imageSize, imageSize)
.placeholder(R.drawable.__picker_ic_photo_black_48dp)
.error(R.drawable.__picker_ic_broken_image_black_48dp)
.into(holder.ivPhoto);
}
// if (canLoadImage) {
// glide
// .load(new File(photo.getPath()))
// .centerCrop()
// .dontAnimate()
// .thumbnail(0.5f)
// .override(imageSize, imageSize)
// .placeholder(R.drawable.__picker_ic_photo_black_48dp)
// .error(R.drawable.__picker_ic_broken_image_black_48dp)
// .into(holder.ivPhoto);
// }

final boolean isChecked = isSelected(photo);

Expand Down Expand Up @@ -216,7 +216,7 @@ public boolean showCamera() {
}

@Override public void onViewRecycled(PhotoViewHolder holder) {
Glide.clear(holder.ivPhoto);
// Glide.clear(holder.ivPhoto);
super.onViewRecycled(holder);
}
}

0 comments on commit d94a9d7

Please sign in to comment.