问题
Using the new theme Theme.MaterialComponents when placing an icon on a button shows me a black box, how can I place an icon with its real color?
<Button
android:id="@+id/idGoogle"
app:icon="@drawable/ic_google"
app:iconTintMode="add"/>
回答1:
The solution
<Button
android:id="@+id/idGoogle"
app:icon="@drawable/ic_google"
app:iconTint="@null"/>
来源:https://stackoverflow.com/questions/54637591/icon-with-real-color-shows-black-background