Generally, the picture fillet can be done in Java, slightly processing the picture, but can also use pure xml+nice-patch pictures, so the speed will be faster. This method is recommended in cases where the background is solid color.
The principle is to use framelayout in the picture to add a cover image, so as to achieve the fillet effect.
Background Image:
An intermediate transparent, four corner with a color of the cover image can be used PS to draw a rounded rectangle, and then reverse and fill the corner color.
Layout files: 01
02<framelayout< p= "" > </framelayout<>
Android:layout_width= "48DP"
android:layout_height= "48DP"
05>
06<imageview< p= "" >
Android:id= "@+id/profile_image"
08; Android:layout_width= "Fill_parent"
android:layout_height= "Fill_parent"
Ten/>
11
12<imageview< p= "" >
android:background= "@drawable/images_border_radius"
14; Android:layout_width= "Fill_parent"
android:layout_height= "Fill_parent"
/>
17
The first ImageView is the target picture, while the first imageview is the masking layer.
Android Picture Fillet effect