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