0

this is my FloatingActionButton

<com.google.android.material.floatingactionbutton.FloatingActionButton
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:backgroundTint="@color/white"
                    android:focusable="true"
                    android:src="@drawable/ic_camera_24"
                    android:tint="@color/green"
                    app:fabSize="mini"
                    app:rippleColor="@color/green" />

i tried to change color in layout ic_camera_24.xml but it still not work, how can i fix it?

have a nice day, everyone!

1 Answers1

0

try this with app:srcCompat and app:tint:

<com.google.android.material.floatingactionbutton.FloatingActionButton
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:backgroundTint="@color/white"
                    android:focusable="true"
                    app:srcCompat="@drawable/ic_camera_24"
                    app:tint="@color/green"
                    app:fabSize="mini"
                    app:rippleColor="@color/green" />

src: https://material.io/components/buttons-floating-action-button/android#mini-fabs

SebastienRieu
  • 1,443
  • 2
  • 10
  • 20