Clans / FloatingActionButton

Android Floating Action Button based on Material Design specification
Apache License 2.0
5.23k stars 1.13k forks source link

Change Fab menu colors dynamically. #466

Open satutigroove opened 5 years ago

satutigroove commented 5 years ago

Hi,

My requirement is to change the fab menus and mini buttons background color and icons color dynamically, Please tell me is it possible to do the same?

I have used this code, but it's not working

floatingActionMenu.setBackgroundTintList(ColorStateList.valueOf(modifyThemeColour.getCompanyPrimaryColor())); fab1.setBackgroundTintList(ColorStateList.valueOf(modifyThemeColour.getCompanyPrimaryColor())); fab2.setBackgroundTintList(ColorStateList.valueOf(modifyThemeColour.getCompanyPrimaryColor()));

0xTL commented 5 years ago

This library is not maintained anymore. Checkout this forked repo(uses androidx)

You can set the color of the menu button with setMenuButtonColorNormal. For the mini button you can use setColorNormal.

Setting the icon color is not possible. In the forked repo, you can set icon color of the menu button(but not of the mini icon yet), setIconTint