In my App I want to disable a FAB in certain cases. But when the FAB has a custom backgroundTint, the background color of that FAB stays the same(does not change to the disabled FAB background color). The FAB is disabled but the color does not change.
Here is an Example: the layout file
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/deleteButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_baseline_clear_24"
app:tint="@color/white"
app:backgroundTint="@color/darkgray_02"
android:layout_margin="10dp"/>
And here is the Code:
binding.deleteButton.isEnabled = false
Here an Image with the corresponding code
A: isEnabled = false, no custom color
B: isEnabled = false, app:backgroundTint="@color/darkgray_02"
Is there a way to set a custom color for the FAB and to disable the FAB at the same time, so that the color changes to the default FAB disabled color when I disable the FAB?
