Is it possible to use Glide to download image to load into a TextView?

后端 未结 4 555
时光说笑
时光说笑 2021-02-06 01:31

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

4条回答
  •  死守一世寂寞
    2021-02-06 01:40

    Glide.with(left.getContext())
         .load(((FixturesListObject) object).getHomeIcon())
         .asBitmap()
         .into(new SimpleTarget(100,100) {
            @Override
            public void onResourceReady(Bitmap resource, GlideAnimation glideAnimation) {
              left.setCompoundDrawablesWithIntrinsicBounds(null, new BitmapDrawable(left.getResources(),resource), null, null);
            }
    });
    

提交回复
热议问题