我想创建一个可以将视图颜色更改为绿色和白色的滤色器。
Paint paint = new Paint();
float[] mx = {
0, 0, 0, 0, 0,
0, 0, 1, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 255
};
paint.setColorFilter(new ColorMatrixColorFilter(mx));
webView.setLayerType(View.LAYER_TYPE_HARDWARE, paint);
这是我正在使用的代码。一切正常,但我的白色变成绿色,但我希望我保持白色。