Find your content:

Search form

You are here

Create rounded button in android xml

 
Share

Create a new drawble file under drawable folder (File name: roundshape.xml) and paste the below code.

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" android:padding="5dp">
    <solid android:color="#000"/> <!-- this one is ths color of the Rounded Button -->
    <corners
        android:bottomRightRadius="5dp"
        android:bottomLeftRadius="5dp"
        android:topLeftRadius="5dp"
        android:topRightRadius="5dp"/>
</shape>

 

in your button add the below line.

android:background="@drawable/roundshape"

My Block Status

My Block Content