Is there a way i could set a gradient color to a MaterialButton from the google material library. app:backgroundTint only sets color but not gradient color
MaterialButton ignored android:background until release 1.2.0-alpha06.
With this release you can use something like:
<Button
    android:background="@drawable/bg_button_gradient"
    app:backgroundTint="@null"
    ... />
If you require this functionality with earlier versions of the library you can use the AppCompatButton. Something like:
<androidx.appcompat.widget.AppCompatButton
    android:background="@drawable/bg_button_gradient"
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With