Question

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

Was it helpful?

Solution

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>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top