4

when i make the first layout with rounded border using this xml layout

 <shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#00ffffff"/>

<stroke android:width="3dp"
    android:color="#ffffff"
    />

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

<corners android:bottomRightRadius="15dp" android:bottomLeftRadius="15dp"
    android:topLeftRadius="15dp" android:topRightRadius="15dp"/>
 </shape>

its make my layout border rounded but the child its be over the rounded border see the image

the parent border was rounded but the child its come over rounded border how can i solve this ?

enter image description here

another image

enter image description here

Jan Pfeifer
  • 2,854
  • 25
  • 35
medo
  • 479
  • 3
  • 9
  • 24

1 Answers1

1

Actually you didnt make it round you just set a rounded background to your view and the layout still is a rectangle .

You can set the same background to child view or use clipping as mentioned in this post.

Community
  • 1
  • 1
Masso
  • 56
  • 4