icon with real color shows black background

℡╲_俬逩灬. 提交于 2019-12-02 18:59:13

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!