The following is the right border of the set button and the color of the bottom border is red and the frame size is 3DP, such as:
Create a new Buttonstyle.xml file in drawable with the following contents:
<?XML version= "1.0" encoding= "UTF-8"?> <layer-listxmlns:android= "Http://schemas.android.com/apk/res/android"> <!--Hyphen Color Value -<Item> <Shape> <SolidAndroid:color= "#ff0000" /> </Shape> </Item> <!--body Background color value - <ItemAndroid:bottom= "3DP"Android:right= "3DP"> <Shape> <SolidAndroid:color= "#ffffff" /> <paddingAndroid:bottom= "10DP"Android:left= "10DP"Android:right= "10DP"Android:top= "10DP" /> </Shape> </Item>
< Button Android:id = "@+id/button1" android:layout_width= "Wrap_content" android:layout_height= "Wrap_ Content " android:text=" Button1 " android:background= "@drawable/buttonstyle"/>
118, through solid to define the color of different borders, you can only define a border color