This method works also.
Create a shape called fab_background.xml in drawable where you can do all the customization you want
Create a layout called custom_fab.xml in layout then set the backround and fab icon using the image view
You can then reference it using include
Example