How to change color of vector drawable path on button click

后端 未结 9 1778
北荒
北荒 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:24

    Check my answer on this other question: https://stackoverflow.com/a/38418049/1335438.

    It is a great idea on how to manage this by using Themes and parameterizing the paths in order to be able to set them dynamically.

提交回复
热议问题