Can't change the color of float action menu
i'm trying to change the color of the float button via more than method
but it still blue and i don't know where the blue come from
here my color accent
and the three attribute fab:fab_addButtonColorNormal="@color/white" fab:fab_addButtonColorPressed="@color/white_pressed" fab:fab_addButtonPlusIconColor="@color/half_black" doesn't work also
+1. I have used this library long back and I remember I could change the color very easily. But recently, idk if its a bug, but I am not able to change the color of the FAB.
Just Change the "colorAccent" or "accent" in the styles.xml file👍
Well when I did it programetically, it worked. It isnt working if I use the xml tags. Any idea? I copy pasted the FAB xml code from the sample itself, so that wasn't a problem.
@srujan7 the sample has wrong attributes
using these tags on a FloatActionMenu does not do anything fab:fab_colorNormal="@color/colorAccent" fab:fab_colorPressed="@color/colorAccentDark"
use these attributes instead (thx to OP) fab:fab_addButtonColorNormal="@color/colorAccent" fab:fab_addButtonColorPressed="@color/colorAccentDark"
i must admit that it's misleading to use attributes that are named and clearly intended to be used with the AddButton
Cool! I'll check on convenience.
use app:fab_addButtonColorNormal="your_color"
is there any way to change this property programatically?
@danielMensah thanks it work Finally but the blue_light color still there when the FAB rotate .
You can use this , i think it will work for you
fab.setColorNormal(ContextCompat.getColor(getContext(),R.color.accent)); fab.setColorPressed(ContextCompat.getColor(getContext(),R.color.accent));
@mima5 blue color was still there on rotation for me too
you have to change app:fab_addButtonColorPressed