Android Button Drawable Tint

前端 未结 7 1494
自闭症患者
自闭症患者 2020-12-04 18:13

Is it possible to tint the drawableLeft in an android button? I have a black drawable I\'d like to tint white. I know how to achieve this with an image view (image on the le

相关标签:
7条回答
  • 2020-12-04 18:42

    You can either use drawable filter or if your API>=M then you can simply

    textView.compoundDrawableTintList = ColorStateList.valueOf(Color.WHITE)
    

    or in XML,

    android:drawableTint="@color/white"
    
    0 讨论(0)
提交回复
热议问题