1

when I use

<corners android:radius="12dp" /> 
<solid android:color="#ffffff" /> 

to set radius,the solid worked, but when I use

<corners android:bottomLeftRadius="12dp"
             android:bottomRightRadius="12dp" />
<solid android:color="#ffffff" /> 

to set bottom radius, the "solid" not worked It is happend on One plus 6.0.1 I don't know why

chrisis
  • 1,983
  • 5
  • 20
  • 17
Octopus
  • 11
  • 1

1 Answers1

0

If you want to set radius to the bottomLeft and bottomRight only. You should try this way:

<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">

    <solid android:color="#ffffff" />
    <corners
        android:topLeftRadius="0dp"
        android:radius="12dp"
        android:topRightRadius="0dp" />
</shape>

You can have a look on this tutorial for more about using shape and selector in Android View

John Le
  • 1,116
  • 9
  • 12