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 download an image and set into to TextView?
try {
Glide.with(holder.logo.getContext())
.load(standingObjectItems.get(position).getImgId()).diskCacheStrategy(DiskCacheStrategy.ALL)
.error(R.mipmap.ic_launcher)
.placeholder(R.mipmap.ic_launcher)
.into(holder.logo);
} catch (IllegalArgumentException | IndexOutOfBoundsException e) {
e.printStackTrace();
}
Glide.with(left.getContext())
.load(((FixturesListObject) object).getHomeIcon())
.asBitmap()
.into(new SimpleTarget<Bitmap>(100,100) {
@Override
public void onResourceReady(Bitmap resource, GlideAnimation glideAnimation) {
left.setCompoundDrawablesWithIntrinsicBounds(null, new BitmapDrawable(left.getResources(),resource), null, null);
}
});