0
여기에 뭔가 잘못입니까? 그레이를 자리 표시 자로로드하려고하지만로드하지 않습니다. 이미 다른 이미지 세트가 있거나로드 된 경우에만 발생하는 것으로 보입니다.ColorDrawable 자리 표시자가 글라이딩에로드되지 않습니다.
Glide.with(getContext())
.load(url)
.placeholder(new ColorDrawable(ContextCompat.getColor(getContext(), R.color.placeholder_gray)))
.error(new ColorDrawable(ContextCompat.getColor(getContext(), R.color.placeholder_gray)))
.dontAnimate()
.into(new SimpleTarget<GlideDrawable>() {
@Override
public void onResourceReady(GlideDrawable resource, GlideAnimation<? super GlideDrawable> glideAnimation) {
image.setImageDrawable(resource);
}
@Override
public void onLoadFailed(Exception e, Drawable errorDrawable) {
resetImageView();
}
});