How to replace color by another on ImageView in Android?

188 views Asked by At

I would like to change (map) white color to blue color. How can I do this on ImageView in Android? I tried setColorFilter by PorterDuff / LightingColorFilter / ColorMatrixColorFilter but I can't figure out how to set it up. There is a transparent background around the image.

example

1

There are 1 answers

1
Nilesh On

Try to use Background Tint color function in xml or java code.

or

I would suggest another way. Take on frame layout and place view and then image view. white portion in image should be transparent use PNG image. and you can give color to base view color which ever you want.