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

有帮助吗?

解决方案

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>
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top