Glide: 4.3.1 override and replace functions not working

I am updating my slide to 4.3.1, but all over the world I use the .override() and .placeholder() functions with the slip function.

 Glide.with(this) .load(imageUrl) .override(200, 200) .placeholder(R.drawable.ic_avatar_sign_up) .into(ivAvatar); 

how can i fix this?

+7
android android-glide glide
source share
2 answers

You must use RequestOptions

Includes methods such as:

  • centerCrop ()
  • aggregate()
  • mistake()
  • a priority()
  • diskCacheStrategy ()
  • a priority()
  • override (100, 100)
  • conversion ()

Code example

 Glide.with(this) .load(YOUR_URL) .apply(new RequestOptions().override(100, 100).placeholder(R.drawable.placeHolder).error(R.drawable.error_pic)) .into(imageview); 
+15
source share

try it

 Glide.with(this) .load(imageUrl) .apply(new RequestOptions().placeholder(R.drawable.ic_launcher).override(200, 200)) .into(ivAvatar); 
+2
source share

All Articles