-
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
How can i give padding to my image #267
Comments
In the same way as with any other |
@hdodenhof Actually the usual padding is not working as expected. My image was getting clipped because of the circular shape. I tried padding/margin etc but it is actually adding padding to the entire image view making it impossible to prevent your image getting clipped. If there arn't any workarounds for that, I might have to use alternate options for my circular imageview requirements. |
@srujanb I'm not sure what exactly you want to achieve but the whole point of this library is to efficiently clip an image to a circle. If you don't want the image to be clipped at all, you don't really need this. |
@hdodenhof I believe that @srujanb is trying to achieve the same thing I am. This is what I want (prototype render): And this is what I am getting with this library: Notice how my image (a calendar icon) has no padding around it. Due to this being CENTER_CROP, it would be nice to be able to pad the images. Would this be possible? Thanks for this library! |
@camrongiuliani using this library for what you want to achieve would be very inefficient (and is currently impossible). As you don't want to crop your image at all, I'd go with the following approach:
Another approach would be using a |
@hdodenhof thank you for the hasty response, and providing a better solution for my use case! |
You can use app:civ_border_color="@color/white" to make it look like a padding |
please review
The text was updated successfully, but these errors were encountered: