There is a bitmap with a white background and an orange triangle inside. What I want to do is change the color of the orange triangle to the color I want, how can I do this with code? I used Porterduff and Color Matrix, but did not get the result I wanted.
Original: click to see the picture
What I want to do with code: click to see the picture
I don't want the white background color to change.
I have used this method to change the color of the bitmap runtime. Give it a try.
Define from and to color in the colors.xml
and use the above method as below.