In my app I download an image from an URL and set it into an ImageView through Glide, however, I\'m trying to remove a few unnecessary layouts, so is it possible to use Glide to
Using Glide 4.7.1:
Glide.with(context)
.load(someUrl)
/* Because we can*/
.apply(RequestOptions.circleCropTransform())
/* If a fallback is not set, null models will cause the error drawable to be displayed. If
* the error drawable is not set, the placeholder will be displayed.*/
.apply(RequestOptions.placeholderOf(R.drawable.default_photo))
.into(new SimpleTarget() {
@Override
public void onResourceReady(@NonNull Drawable resource,
@Nullable Transition super Drawable> transition) {
/* Set a drawable to the left of textView */
textView.setCompoundDrawablesWithIntrinsicBounds(resource, null, null, null);
}
});