2

I'm trying to find an optimal way to color dynamically parts of an image in my Android application. I have been reading about vectorDrawables and color specific paths of them, but I didn't find any good example or way about how to do it efficiently.

My idea is find a way to draw the next dummy, coloring with red the specific "muscles" that are worked when you do an specific exercise:

enter image description here

How can I achieve this using vectorDrawable or any another way?

halfer
  • 19,824
  • 17
  • 99
  • 186
Francisco Durdin Garcia
  • 12,540
  • 9
  • 53
  • 95
  • 1
    one way to pull this off is to have two images one fully red, and one fully grey on top of each other, and to use masking on the red one to only show parts of it, see this: http://stackoverflow.com/questions/12614542/maskingcrop-image-in-frame – marmor Apr 06 '17 at 11:23
  • possible duplicate of this http://stackoverflow.com/questions/8801047/how-to-fill-color-in-image-in-particular-area – user007 Apr 06 '17 at 11:30
  • This can be achieved by applied a different theme to the drawable. That will need one theme for every case, which is not very efficient/easy way. Better would be to have every part as a separate drawable and just tint the needed ones. – shelll Apr 06 '17 at 12:10

0 Answers0