1. First in res/.drawable in the definition of a shape.xml file, the specific color you can tune yourself<?xml version="1.0"encoding="UTF-8"? ><shape xmlns:android="http://schemas.android.com/apk/res/android"Android:shape="Rectangle"> <!--fill color: Here set the background transparent--<solid android:color="@android: Color/transparent"/> <!--border color: cannot be the same as window background color-<Stroke Android:width="3DP"Android:color="#ffffff"/> <!--set the four corners of the button arc--<!--Android:radius arc Radius--<corners android:radius="5dip"/> <!--padding:button spacing between text and button boundaries--<padding Android:bottom="10DP"Android:left="10DP"Android:right="10DP"Android:top="10DP"/></shape>------------------------------------------------------------------------2. Define a button in your activity's XML (such as Activity_main.xml)<Button Android:id="@+id/roundbutton"Android:layout_width="wrap_content"Android:layout_height="wrap_content"Android:background="@drawable/shape"Android:text="Fillet button"/>
Android Corner button