문제

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