第一次点击sv,画一个红色,第二次点击画一个蓝色,后面画的会覆盖前面画的。
请问我想控制Z轴,让第二次画的蓝色在红色后面,该怎么做?
`
if(first==1){
first++;
canvas = holder.lockCanvas(new Rect(x, y, x + 100, y + 100));
canvas.drawRect(x, y, x + 100, y + 100, paint);
}else{
paint.setColor(Color.BLUE);
canvas = holder.lockCanvas(new Rect(x, y, x + 100, y + 100));
canvas.drawRect(x, y, x + 100, y + 100, paint);
}
holder.unlockCanvasAndPost(canvas);`