The new Buttonstyle.xml code is as follows
<?xml version="1.0"encoding="UTF-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <!--box color values--><item> <shape> <solid android:color="#151104"/> <corners android:radius="6DP"/> </shape> </item> <!--body background color values--<item android:bottom="1DP"android:right="1DP"android:top="1DP"android:left="1DP"> <shape> <gradient android:startcolor="#eb6b00"Android:centercolor="#ef8000"Android:endcolor="#f49500"Android:type="Linear"android:angle=" -"Android:centerx="0.5"android:centery="0.5"/> <padding android:left="2DP"android:top="2DP"android:right="2DP"Android:bottom="2DP"/> <!--should be rounded and <corners android:radius="6DP"/> </shape> </item> </layer-list>
button Apply Style
<Button Android: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"/>
Android rounded button with border