Android setTint Of FloatingActionButton Icon Color

May 11, 2018

In the following example, @drawable/ic_photo_camera_black_24dp icon is black color but we use app:tint to change it to white.

<android.support.design.widget.FloatingActionButton
    android:id="@+id/fab"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="bottom|end"
    android:layout_margin="@dimen/fab_margin"
    app:tint="@android:color/white"
    app:srcCompat="@drawable/ic_photo_camera_black_24dp" />
This work is licensed under a
Creative Commons Attribution-NonCommercial 4.0 International License.