in android, I want to define a shape file in the drawable : myShape.xml , for example below:
<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <solid android:color="@color/white"/> <corners android:radius="@dimen/corner"/> <stroke android:width="5dp" android:color="@color/boder_endcall_color"/> </shape>
And I want to create a gradient border in <stroke /> , but I really don't know how to do it! So, can anyone give an example of creating a shape with a gradient color in stroke ? Thanks!
Edit: I want a gradient color from #F85C5C (red) to #F68282 (reddish).
source share