Floating action button background color change.

Eungi KimΒ·2020λ…„ 12μ›” 1일
0

The background color of this view defaults to the your theme's colorAccent. If you wish to change this at runtime then you can do so via setBackgroundTintList(ColorStateList).

<com.google.android.material.floatingactionbutton.FloatingActionButton
    android:id="@+id/"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    app:backgroundTint="@android:color/holo_orange_dark"
    />

or

fb.setBackgroundTintList(ColorStateList.valueOf(your color in int));

stackoverflow

profile
Run and gun and debugun

0개의 λŒ“κΈ€