Button new design 3 color it might helps

  • 0

Button new design 3 color it might helps

Category : Uncategorized

 

enter image description here

 

Add this code to activity_main.xml

    <Button
android:id="@+id/angry_btn"

android:text="Button"
android:textColor="#FFFFFF"
android:textSize="30sp"

android:layout_width="270dp"
android:layout_height="60dp"
android:background="@drawable/buttonshape"
android:shadowColor="#1499A8"
android:shadowDx="0"
android:shadowDy="0"
android:shadowRadius="5"
/>

And this to drawable folder with name buttonshape.xml

    <?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<corners
android:radius="14dp"
/>
<gradient
android:angle="45"
android:centerX="35%"
android:centerColor="#1FA8D1"
android:startColor="#E8E8E8"
android:endColor="#000000"
android:type="linear"
/>
<padding
android:left="0dp"
android:top="0dp"
android:right="0dp"
android:bottom="0dp"
/>
<size
android:width="270dp"
android:height="60dp"
/>
<stroke
android:width="3dp"
android:color="#2D6C87"
/>
</shape>

enter image description here


Leave a Reply