Clans / FloatingActionButton

Android Floating Action Button based on Material Design specification

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Change Fab menu colors dynamically.

satutigroove opened this issue · comments

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()));

commented

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