Question:
I have got an Activity
used as a popup.
It's background is a shape with rounded corners.
But the items of it's content view don't fill out the shape. They are more likely inside of an invisible rectangle inside of the shape.
Can I somehow make them fill the shape and being cut when overlapping the corners?
Solution:
- Add this code to the view with the shape background:
view.setClipToOutline(true); --> clips the view view.setOutlineProvider(ViewOutlineProvider.BACKGROUND); --> tells the view to be clipped by the background(shape)
- If the paddings of the view are too big, just make them smaller so you can see an effect of the clipping