1

I made a folder in drawable named round corners but it is not working on the actual application:

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item>
        <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
            <solid android:color="@android:color/darker_gray" />
            <corners android:radius="10dp" />
        </shape>
    </item>
</selector>

the rest of the application is working fine but the button is still rectangular

Mateo Hervas
  • 545
  • 1
  • 5
  • 20

1 Answers1

0

Use this xml code to create a rectangle with rounded corners:

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="@android:color/white" />
    <corners android:radius="10dp" />
</shape>

In case your question is really about how to style a Button, this SO post might give you a good start:

Android Material Design Button Styles

muetzenflo
  • 5,653
  • 4
  • 41
  • 82