How can I set rectangular image inside this kind of shape with clip to bound. The only resource I was given is just this shape with stroke and a rectangular image view. Do you have any suggestion how to achieve this result ?
Asked
Active
Viewed 398 times
0
-
You have to use search. There're tons of answers on your question: http://stackoverflow.com/questions/18378741/how-to-make-an-imageview-in-circular-shape – eleven Sep 26 '15 at 22:28
-
Sir, I've seen all those. All the examples I found so far had just simple ROUND shape. If that was my case I wouldn't post this question. The shape I put up is not 100% round. Thats why I wanted to know if there is any other way to do it. – Alex Sep 26 '15 at 22:33
-
All those answers explain method which uses `Path` for cutting image. `Path` could be absolutely different. Your "roundish" shape could be created by four(or more) arcs for instance. – eleven Sep 26 '15 at 22:37
1 Answers
2
As I just answered to someone else, I think the first step in "how do I do this neat UI trick?" should always be to check out wasabeef's amazing collection of UI libraries. In your case, check out Maskable Layout. With it, you provide a drawable to use as a mask for your image.

TBridges42
- 1,849
- 1
- 19
- 29
-
That really helps sir. Thanx :) . I wish I could mark that as ans but my rep is low. – Alex Sep 26 '15 at 23:19