1

I want create custom background and i want create this in drawable folder.
For this background i write below codes :

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">

    <stroke
        android:width="1dp"
        android:color="@color/gradient_center" />

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

</shape>

but in this code i just set sold color for stroke, i want set gradient color for stroke color.

how can i it?

1 Answers1

0
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">

<gradient
    android:angle="90"
    android:endColor="#b5b6d2"
    android:startColor="#555994"
    android:type="linear" />

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

</shape>
Hamed Nabizadeh
  • 527
  • 4
  • 9