Is it possible to set a custom background to a floating action button? For example, I'd like the fab to have background color with a gradient, and the "plus" icon on top of that. I've only seen simple background color so far. I'd like to keep using the design support library from Google.
You set background color to Floating Action Button through this property:
android:backgroundTint= "@color/colorPrimary"
and this does not accept @drawable
. Which means you can not apply any drawable so my answer is NO, you cannot apply gradient to fab.
According to Google Buttons: Floating Action Button documentation, Google suggests to avoid such designs.:
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