Android Settings View Fillet

Source: Internet
Author: User

It's simple, but it's a record. It's a different trip.

Create a layout file under the drawable file Corners_bg.xml

  1. <?xml version="1.0" encoding="Utf-8"?>
  2. <shape xmlns:android=" http://schemas.android.com/apk/res/android " >    
  3.     <solid android:color=" #000000 "  />//Fillet view background color   
  4.     <corners android:topleftradius=" 10DP "    //left corner
  5.                 Android:toprightradius=" 10DP "    //upper right rounded
  6.                  android:bottomrightradius=" 10DP "    
  7.                  android:bottomleftradius=" 10DP "/>    
  8. </shape>
generally, four rounded corners are the same, can be simply written as:
  1. <?xml version=" 1.0 "  encoding=" Utf-8 "? >  
  2. <shape xmlns:android=" http://schemas.android.com/apk/res/android " >    
  3.     <solid android:color=" #000000 "  />    
  4. <corners android:radius="5DP"/>  
  5. </shape>
The call is simple and only needs to be in the view with rounded corners:        
    1. android:background="@drawable/corners_bg"

Android Settings View Fillet

Related Article

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.