markormesher / android-fab

Floating action button (FAB) for Android with speed-dial menu functionality
Apache License 2.0
211 stars 29 forks source link

FloatingActionButton Ripple colour #27

Closed ghost closed 6 years ago

ghost commented 6 years ago

Hi there

I'm having an issue, when I switched from the standard android FAB to this one my ripple effect on the FAB is no longer grey (or a darker orange), it now seems to use my primary colour of my application which is green, and on an orange FAB it really does not look right.

I set the FABs colour via app:buttonBackgroundColour="@color/accent" in the XML.

How would i go about changing this? I've tried setting the cardViews drawable to my own selector which didn't work. Not sure what else to do.

This also happens on the SpeedDialMenuItemsbut the green isn't so bad on a grey background, though id prefer to use a darker grey then green too.

UPDATE It is strange though when I press the FAB it does look like it goes grey or possibly a darker orange (which is great), but then suddenly tints a slight green.

markormesher commented 6 years ago

Hey @dkroukamp. Could you share an example of the code you're using? If it's in git, it would be super-useful to see how you were applying the styles before/after the change. Thanks.

ghost commented 6 years ago

Ill try getting a small example app up on here in a few hours for you to look at! Will Bump this thread when its up. Thanks alot :).

ghost commented 6 years ago

Figured out the issue while trying to replicate in a smaller project.

In my styles.xml I had <item name="android:colorControlHighlight">@color/primary</item> which applied the green highlight to all controls!

Sorry mate my mistake!

markormesher commented 6 years ago

No problem, glad you got it figured out! I should have time to release a new version for #26 some time this week.