I update my glide to 4.3.1 but all over I use glide the feature .override()
and .placeholder()
get error: cannot find symbol method
.
Glide.with(this)
.load(imageUrl)
.override(200, 200)
.placeholder(R.drawable.ic_avatar_sign_up)
.into(ivAvatar);
How can I fix this?
Image Resizing with override(x, y) Glide automatically limits the size of the image it holds in cache and memory to the ImageView dimensions.
Placeholders are Drawables that are shown while a request is in progress.
You should use RequestOptions
Includes methods like:
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);
Try This
Glide.with(this)
.load(imageUrl)
.apply(new RequestOptions().placeholder(R.drawable.ic_launcher).override(200, 200))
.into(ivAvatar);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With