Question regarding FloatingActionButtons coloring.
jatsqi opened this issue · 2 comments
jatsqi commented
About this issue
Hey,
i have been using this awesome library for a while now and everything works pretty smoothly overall, but I ran into an issue when it comes to FloatingActionButtons.
The button looks like this:
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/button_edit_toggle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
android:clickable="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
The icon is set via Kotlin at runtime:
val icon = IconicsDrawable(requireContext(), OutlinedGoogleMaterial.Icon.gmo_android).apply {
colorInt = Color.WHITE
sizeDp = 50
}
editToggleButton.setImageDrawable(icon)
The icon of the button still appears black, even though I set the color to white. Is this some limitation of the library when it comes to these drawables or did I something wrong here?
This scenario works perfectly fine with the IconicsImageView btw.
Details
- [5.2.8] Used library version
- Android Studio Emulator, API Level 30
Checklist
- Searched for similar issues
- Checked out the sample application
- Read the README
- Checked out the CHANGELOG
- Read the FAQ
- Checked out the MIGRATION GUIDE