George Yang
George Yang

Reputation: 704

Is there a way to set the ripple color for a Floating Action Button through XML Attributes?

I see that there is a setRippleColor method but I was wondering if I could avoid changing the color of the Floating Action Button programatically. Thanks for any help!

Upvotes: 3

Views: 921

Answers (3)

UmAnusorn
UmAnusorn

Reputation: 11164

You may need to set clickable too.

app:rippleColor="@color/colorPrimaryDark"
android:clickable="true"

Upvotes: 1

Collins Abitekaniza
Collins Abitekaniza

Reputation: 4588

Use this app:rippleColor="@color/your_ripple_color"

Upvotes: 3

phxhawke
phxhawke

Reputation: 2611

You are looking for app:rippleColor.

Upvotes: 2

Related Questions