带有实色的图标显示黑色背景 [英] icon with real color shows black background
本文介绍了带有实色的图标显示黑色背景的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在按钮上放置图标时,使用新主题Theme.MaterialComponents会给我显示一个黑框,如何放置具有真实颜色的图标?
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"/>
推荐答案
解决方案
<Button
android:id="@+id/idGoogle"
app:icon="@drawable/ic_google"
app:iconTint="@null"/>
这篇关于带有实色的图标显示黑色背景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文