1 problem

Glide may not have a picture when loading the picture address, so we need to deal with this abnormal situation, of course, we also need to round the picture

2 Code Solution

Glide.with(mContext).load(iconPath).error(new ColorDrawable()).listener(new RequestListener<Drawable>() { @Override public boolean onLoadFailed(@Nullable GlideException e, Object model, Target<Drawable> target, Boolean isFirstResource) {// return false; } @Override public boolean onResourceReady(Drawable resource, Object model, Target<Drawable> target, DataSource dataSource, boolean isFirstResource) { return false; } }).apply(RequestOptions.bitmapTransform(new CircleCrop())).into(holder.navigationIv);Copy the code