Mask layout with rounded corner xml shape



I have this LinearLayout:


enter image description here


And I want to mask it with rounded corner, like this:


enter image description here


I tried to put it in a FrameLayout with another layout with shape.xml on top of it,


But the most I got was:


enter image description here


or


enter image description here


I'm looking for a way to use shape.xml background,


But with transparent inside the border, and white color outside.


My shape.xml:



<shape
xmlns:android="http://ift.tt/nIICcg"
android:shape="rectangle">
<solid
android:color="#FFFFFF">
</solid>

<stroke
android:width="2dp"
android:color="#000000" >
</stroke>

<padding
android:left="5dp"
android:top="5dp"
android:right="5dp"
android:bottom="5dp">
</padding>

<corners
android:radius="50dp">
</corners>
</shape>

No comments:

Post a Comment