You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is no native support for this, but you should be able to achieve it by subclassing CircleImageView and overriding onDraw with some custom behavior while still calling super.onDraw(). An easier way would probably be wrapping the CircleImageView in a FrameLayout which draws the border and has some padding.
b-runo, shaiban365, codeForge13, sarwarsateer, ParryPatel021 and 2 moresarwarsateer
Activity
[-]Padding[/-][+]Add Padding between border and the image[/+]iamtodor commentedon Jun 12, 2016
It could be useful
+1
hdodenhof commentedon Jun 12, 2016
There is no native support for this, but you should be able to achieve it by subclassing
CircleImageView
and overridingonDraw
with some custom behavior while still callingsuper.onDraw()
. An easier way would probably be wrapping theCircleImageView
in aFrameLayout
which draws the border and has some padding.b-runo commentedon Jun 13, 2016
I know I'm already asking a lot but have a sample code 😅.
hdodenhof commentedon Jun 20, 2016
In your layout:
And drawable/circle_background.xml:
samitparadedocs commentedon Jun 22, 2016
Great work.
Thank you.
b-runo commentedon Jun 23, 2016
Thanks.
Updated CircularImageView to have gap between image and border (hdode…