Tuesday, January 1, 2019

How to create a round/circle Button in Android

Today I will show you how to create a round / circle Button in Android to accomplish this problem, please follow the article below. I wish... thumbnail 1 summary
Today I will show you how to create a round / circle Button in Android to accomplish this problem, please follow the article below. I wish you all good learning.
How to create a round/circle Button in Android

Create buttom_cricle_round.xml  in folder res\drawble.

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item>
        <shape android:shape="oval">
            <stroke android:color="#A86500" android:width="5dp" />
            <solid android:color="#3CFF00"/>
            <size android:width="250dp" android:height="250dp"/>
        </shape>
    </item>
</selector>

Create buttom on layout.xml

 
 <Button
        android:id ="@+id/btn__demo"
        android:layout_width="150dp"
        android:layout_height="150dp"
        android:text="Round Button"
        android:layout_gravity="center"
        android:background="@drawable/buttom_cricle_round"
        android:padding="15dp"
        />
Tags : Custom round button in android, Custom circle in android
How to create a round/circle Button in Android

No comments

Post a Comment