Android Glide placeholder size

后端 未结 4 631
醉话见心
醉话见心 2021-01-07 23:25

I have a problem with Android Glide. I am trying to quickly swap my image, they just become all placeholder size, and my placeholder image is very low size. So what I need t

4条回答
  •  走了就别回头了
    2021-01-08 00:11

    According to this issue on Glide GitHub page you can fix it with adding following line to your request of Glide:

      .dontAnimate()
    

    That would make your full load line:

      Glide.with(context)
                .load("http://lorempixel.com/150/150")
                .placeholder(R.drawable.no_image)
                .override(100, 100)
                .dontAnimate()
                .into(imageView);
    

提交回复
热议问题