-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
RoundingParams.setBorder(..) does not work #12
Comments
Do you see the rounded corners correctly? Is it just the border that is the problem? |
Also, if you add .setOverlayColor(0xFFFFFF00) while building RoundingParams, what happens? This will help us diagnose where the issue might be. |
@IanChilds, I was able to round the image with the code I provided. I am currently only able to circle an image by using: RoundingParams.asCircle() @plamenko, If I use setOverlayColor() in conjunction with RoundingParams.asCircle(), the rectangular area holding the circle is painted using that overlay color. However, that color is not drawn over the actual image itself. if I use setOverlayColor in conjunction with RoundingParams.fromCornersRadius(), there is no effect at all, as the image is itself rectangular therefore no area is left to be filled by the color. |
Alright, I think i've narrowed down the problem. The setBorder() method seems to ignore android color references. For example If I run the following, I don't get expected result:
However, when I remove the color reference and provide the color value directly, it works as expected:
|
Yes, this should be ARGB color, not a resource reference. Both of those use |
You can always get the color value from the resource id with |
Thanks a lot @plamenko.. |
I am not able to show a border to an image. Neither through code, nor XML.
The text was updated successfully, but these errors were encountered: