Is it possible to change material design icon color from xml in Android?

前端 未结 9 1083
囚心锁ツ
囚心锁ツ 2020-12-05 06:39

I\'m actually trying to use colored icons in my app. I\'ve downloaded the official material design icon pack from here. Now all the icons in this pack are either white, grey

9条回答
  •  醉酒成梦
    2020-12-05 07:19

    Yes, it's possible and it's simple using this library: https://github.com/jrvansuita/IconHandler

    You can easily call this:

    Icon.on(yourImageView).color(R.color.your_color).icon(R.mipmap.your_icon).put();
    

提交回复
热议问题