Glide Version: 3.7.0
Device/Android Version: SM801 / 5.1.1
Issue details / Use case background:
Glide set a default error image when load failed.
But when I start another Activity and back to the previous Activity锛宼he ImageView which loaded the error image will retry to load the url. And it will failed again, then set the default error image again.
This twinkling animation is not suitable.
I don't want to auto reload the url which had load failed.
How should I do ?
Glide load line:
I use Glide in RecyclerView.Adapter.
protected void onBindViewHolder(@NonNull ViewHolder holder, @NonNull final Topic topic) {
Glide.with(holder.avatar.getContext())
.load(topic.getUser().getAvatarUrl())
.error(R.mipmap.ic_avatar_error)
.crossFade()
.into(holder.avatar);
}
screen recording:
Please notice the avatar of "luhaoaimama1",

Would it work for you if you added .placeholder(R.mipmap.ic_avatar_error)? Theoretically it should fix the problem, however it will change the behavior the first time any profile image is shown. Give it a spin and let me know.
Follow your advice锛宼hese avatar would not twinkle. Thank you very much.
But is there a function to prevent Glide to reload a picture which had load failed before ?
Most helpful comment
Follow your advice锛宼hese avatar would not twinkle. Thank you very much.
But is there a function to prevent Glide to reload a picture which had load failed before ?