How to change color of vector drawable path on button click

后端 未结 9 1787
北荒
北荒 2020-12-01 00:33

With the new android support update, vector drawables get backward compatibility. I have a vector image with various paths. I want the color of the paths to change on click

9条回答
  •  借酒劲吻你
    2020-12-01 01:09

    DrawableCompat.setTint(imageView.getDrawable(),ContextCompat.getColor(getApplicationContext(), R.color.colorAccent));

提交回复
热议问题