質問

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