-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Allow CircleImageView to work with ColorDrawables #1
Comments
+1! |
can you please make generic fix for all drawables without explicit size (e.g. ShapeDrawable, GradientDrawable etc)? |
I've added a generic upstream in RoundedImageView that implements basic support for all drawables without explicit size. Please help test before I push out the next release: vinc3m1/RoundedImageView#30 FYI RoundedImageView has had support for circle images for a long time now through its |
I actually doubt that the approach of just using fixed dimensions works well with drawables other than ColorDrawables, that's why I restricted it for now. I'll try to look into this over the next couple days. |
That's true, but other drawables with effects based on dimensions should not be returning -1 in |
I use ColorDrawables as placeholders while profile pictures are being loaded from the network. However, ColorDrawables have an intrinsic height and width of -1, causing Bitmap.createBitmap to fail in CircleImageView.getBitmapFromDrawable.
The text was updated successfully, but these errors were encountered: