Can someone share how to implement a gradient background to a floating action button ?
I want to achieve something like that:
I tried to use the drawable below:
<?xml version="1.0" encoding="utf-8"?>
<item>
<shape android:shape="oval">
<gradient
android:type="linear"
android:angle="0"
android:startColor="#f6ee19"
android:endColor="#115ede" />
</shape>
</item>
<item android:gravity="center"
>
<bitmap android:src="@drawable/ic_close_accent"
android:gravity="fill_horizontal" />
</item>
Then in my activity i set android:src to this drawable but it didn't work
I also tried to set android:backgroundTint and android:background but these didn't work too.
Can someone please help?