Closed bikranttripathi closed 7 years ago
Same Problem Here. Even when optimize RecyclerView/Adapter, still getting this problem
Glide isn't currently supported, use the rounded transforms from https://github.com/wasabeef/glide-transformations and you can just target a regular ImageView
I started noticing huge spikes in memory when using this library with Glide. I believe the issue lies in drawableToBitmap method.
Since Glide is wrapping bitmap into GlideBitmapDrawable, RoundedImageView doesn't know how to extract the bitmap from that drawable. So, every single time it just creates another bitmap and now we have two instances of the same image.
I did a quick & dirty fix for this as a short term solution by updating the drawableTobitmap method to:
and added Glide as provided dependency
provided 'com.github.bumptech.glide:glide:3.8.0'
It would be great if there is a better way to do this than my hack :)