Pregunta

I have an image that is a white square. I would like to convert it to a grey image on a white background. I think alpha could be used here but i am not sure.

¿Fue útil?

Solución

Hey you can use setColorFilter() method of image view to set a filter/tint for your imageview. sample-

  imageView.setColorFilter(Color.GRAY);

 imageView.setColorFilter(Color.GRAY,PorterDuff.Mode.Lighten);

the second one gives a tinted effect.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top