如何在Android的设置色调的图像视图编程?视图、色调、图像、如何在

2023-09-05 06:21:23 作者:旧城の情殇丶

需要设置色调的图像查看......我用它的方式如下:

Need to set tint for an image view... I am using it the following way:

imageView.setColorFilter(R.color.blue,android.graphics.PorterDuff.Mode.MULTIPLY);

不过,这并不改变...

But it doesn't change...

推荐答案

您可以在code,通过改变色彩,很容易:

You can change the tint, quite easily in code via:

imageView.setColorFilter(Color.argb(255,255,255,255)); //白色色调