문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top