Applying ColorFilter to ImageView with ShapedDrawable

前端 未结 4 1749
北海茫月
北海茫月 2020-11-27 16:21

I have an ImageView with android:src set to a ShapedDrawable, namely a white circle. What I want is to colorize this ImageView

4条回答
  •  感动是毒
    2020-11-27 16:46

    You can use attribute android:tint in ImageView in xml.

    Example:

    
    

    Tested on Android 4.1.2 and 6.0.1

提交回复
热议问题