This is my code:
<android.support.design.widget.FloatingActionButton
android:id="@+id/enter_floating_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginBottom="40dip"
android:layout_marginRight="10dip"
android:clickable="true"
app:background="#00FF00"
app:backgroundTint="#00FF00"
app:rippleColor="@android:color/red"
app:fabSize="normal"
android:src="@drawable/ic_done" />
As you can see, I set app:background
and app:backgroundTint
, but these are useless, FloatingActionButton's
background color doesn't change, and either the app:rippleColor
, when i press the button it's color isn't which I set, looks like the accentColor in the theme.
Why don't these attributes work?
How can I change the FloatingActionButton's
background and ripple color?
I had seen this: Android changing Floating Action Button color. Some answers may work in 22, but I didn't find a useful way in 23.