Glide 4.3.1 override and placeholder features not work

可紊 提交于 2019-12-01 15:05:11

You should use RequestOptions

Includes methods like:

  • centerCrop()
  • placeholder()
  • error()
  • priority()
  • diskCacheStrategy()
  • priority()
  • override(100, 100)
  • transforms()

Sample code

Glide.with(this)
     .load(YOUR_URL)
     .apply(new RequestOptions().override(100, 100).placeholder(R.drawable.placeHolder).error(R.drawable.error_pic))
     .into(imageview);
Ratilal Chopda

Try This

Glide.with(this)
     .load(imageUrl)
     .apply(new RequestOptions().placeholder(R.drawable.ic_launcher).override(200, 200))
     .into(ivAvatar);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!