I'm trying to add a gradient background to a Material Button, using this drawable:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"
>
<gradient
android:angle="45"
android:endColor="#000000"
android:startColor="#FFFFFF"
/>
</shape>
I'm trying it setting up the background like:
android:background="@drawable/gradient"
But it just doesn't work. I know to setup a solid color I can do it like:
app:backgroundTint="@color/solid"
Any ideas?