Now i was working on an demo app that load movies data from an api and i figured out that Glide is a bet faster than Picasso so after using it and adding
RequestOptions requestOptions = new RequestOptions();
requestOptions.error(R.drawable.poster_placeholder);
Glide.with(context)
.setDefaultRequestOptions(requestOptions)
.load(film.getPoster())into(poster);
error() works fine but i need to add loading gif to improve UX so i find this solution to add gif and it works great but error() stop working, gif is always run now.
the new code is
RequestOptions requestOptions = new RequestOptions();
requestOptions.error(R.drawable.poster_placeholder);
Glide.with(context)
.setDefaultRequestOptions(requestOptions)
.load(film.getPoster())
.thumbnail(Glide.with(context)
.load(R.drawable.placeholdergif)).into(poster);
i need a solution that make error() works again or other way to display loading image til the image is loaded.