Android Picture Fillet effect

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.