小编Nur*_*lia的帖子

Android setColor - 想改变颜色但总是不起作用

我想将以下示例中使用的颜色更改为棕色,但我的尝试无效:

 mPaint = new Paint();
 mPaint.setAntiAlias(true);
 mPaint.setDither(true);
 mPaint.setColor(Color.RED);
Run Code Online (Sandbox Code Playgroud)

这不起作用:

mPaint.setColor(Color.Brown);
Run Code Online (Sandbox Code Playgroud)

这也不是:

mPaint.setColor(mPaint.setColor(0x00994C00));
Run Code Online (Sandbox Code Playgroud)

它仅在我将颜色更改为RED, GREEN, BLUE, CYAN,时才有效MAGENTA。

有人可以帮我解决这个问题吗?

android drawing paint colors

1
推荐指数
1
解决办法
1807
查看次数

标签 统计

android ×1

colors ×1

drawing ×1

paint ×1