Glide With Drawable

Reference Link: https://stackoverflow.com/questions/33594735/is-it-possible-to-use-glide-to-download-image-to-load-into-a-textview

Sample Code:


Glide.with(myFragmentOrActivity).load(imageUrl)
.into(new CustomTarget(100,100) {

@Override
public void onResourceReady(@NonNull Drawable resource, @Nullable Transition transition)
{
       left.setCompoundDrawablesWithIntrinsicBounds(null, resource, null, null);
}

@Override
public void onLoadCleared(@Nullable Drawable placeholder){
     left.setCompoundDrawablesWithIntrinsicBounds(null, placeholder, null, null);
}

});

Author: joker