Skip to content
This repository has been archived by the owner on Oct 23, 2020. It is now read-only.

Tint and srcCompat #437

Open
dovahkiin98 opened this issue Mar 21, 2018 · 2 comments
Open

Tint and srcCompat #437

dovahkiin98 opened this issue Mar 21, 2018 · 2 comments

Comments

@dovahkiin98
Copy link

Tint doesn't apply to icon
and app:srcCompat isn't recognized

@Croutonix
Copy link

Yes, because FloatingActionButton extends android.widget.ImageButton and not the support library equivalent. The solution around this is to tint your own icons by code...

@kolagit
Copy link

kolagit commented Dec 12, 2019

As stated, this library is not supported any longer.
To make it compatible with AndroidX,
All you need to do is :

update ImageView to use "androidx.appcompat.widget.AppCompatImageView",
update ImageButton to use "androidx.appcompat.widget.AppCompatImageButton"
(You have to fix one of super class constructor as AppCompatImageButton constructor
changed. getOpacity() method.)
It fixed the AndroidX compatibility issue for me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants