Corner radius in button is not changing, what to do?

184 views Asked by At

I'm trying to make simple button style with 100dp corner radius (working in Intellije Idea).

That's the code:

<corners android:radius="100dp"/>

<solid android:color="@color/green"/>

<padding
        android:left="5dp"
        android:top="5dp"
        android:right="5dp"
        android:bottom="5dp"
        />

<size
        android:width="110dp"
        android:height="40dp"
        />

I can't find problem... Because the target button i'm trying to change is not actually changing. It seems that the corner radius is not changing! that's my button with 100dp!!! corner radius

1

There are 1 answers

0
silwar On BEST ANSWER

Try this

<shape xmlns:android="http://schemas.android.com/apk/res/android" >
    <corners 
        android:topLeftRadius="100dp"
        android:topRightRadius="100dp"
        android:bottomLeftRadius="100dp"
        android:bottomRightRadius="100dp"/>

<solid android:color="@color/green"/>

<padding
        android:left="5dp"
        android:top="5dp"
        android:right="5dp"
        android:bottom="5dp"
        />

<size
        android:width="110dp"
        android:height="40dp"
        />

</shape>