Applying ColorFilter to ImageView with ShapedDrawable

前端 未结 4 1748
北海茫月
北海茫月 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:30

    If you want to change Image Color use

    PorterDuff.Mode.SRC_ATOP instead
    PorterDuff.Mode.MULTIPLY
    

    in above example.

提交回复
热议问题