The new Buttonstyle.xml code is as follows
<?XML version= "1.0" encoding= "UTF-8"?> <layer-listxmlns:android= "Http://schemas.android.com/apk/res/android"> <!--Hyphen Color Value -<Item> <Shape> <SolidAndroid:color= "#151104" /> <CornersAndroid:radius= "6DP" /> </Shape> </Item> <!--body Background color value - <ItemAndroid:bottom= "1DP"Android:right= "1DP"Android:top= "1DP"Android:left= "1DP"> <Shape> <GradientAndroid:startcolor= "#eb6b00"Android:centercolor= "#ef8000"Android:endcolor= "#f49500"Android:type= "Linear"Android:angle= "All"Android:centerx= "0.5"Android:centery= "0.5" /> <paddingAndroid:left= "2DP"Android:top= "2DP"Android:right= "2DP"Android:bottom= "2DP" /> <!--It should be a fillet . - <CornersAndroid:radius= "6DP" /> </Shape> </Item> </layer-list>
button Apply Style
<ButtonAndroid:id= "@+id/btnsave"Android:background= "@drawable/buttonstyle"Android:layout_width= "Match_parent"Android:layout_weight= "1"Android:layout_height= "Wrap_content"Android:textcolor= "#ffffff"android:textsize= "15SP"Android:height= "37DP"Android:text= "Save" />
The effect is as follows: