New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The image cannot be showed sometimes when used by Glide 3.7.0 #13
Comments
I'll look into it, and come back soon! :) |
Found the reason, and solution as well! It seems you are using old version of Glide. Reason: Solution: Glide.with(this)
.load(result.images.original.url)
.thumbnail(thumbnailRequest)
.listener(new RequestListener<BitmapDrawable>() {
//...
@Override
public boolean onResourceReady(BitmapDrawable resource, Object model, Target<BitmapDrawable> target,
DataSource dataSource, boolean isFirstResource) {
// You can use resource as BitmapDrawable!
}
})
.into(imageView); |
It's very kind of you to help me in resolving the problem. But there's a little pity, the version of Glide on jcenter is only upto 3.7.0. The way which you showed depends on 4.0 on github's library. So I have to use "asBitmap" to get bitmap and "setImagebitmap” in SimpleTarget and wait for 4.0 on jcenter later. Anyway, do not use GlideBitmapDrawable, that's right. Thank you for your help and your SelectableRoundedImageView :) |
No problem! :) |
This is my code for loading url image. The "selectRoundIv" is the object of SelectableRoundedImageView. It seems worked. But when I set scaleType with centerCrop, there's a problem. The image cannot be showed, or be showed without corners.
This is the effect of this issue. By the way, the top imageview' url and the top selectableRoundImageView's url are the same.
And this is the effect which is image be showed without cornors.
The text was updated successfully, but these errors were encountered: