Paint p =new Paint();
//清屏
p.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.CLEAR));
canvas.drawPaint(p);
p.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC));
//清屏后view显示黑色背景重新定义
canvas.drawColor(Color.WHITE);
Paint p =new Paint();
//清屏
p.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.CLEAR));
canvas.drawPaint(p);
p.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC));
//清屏后view显示黑色背景重新定义
canvas.drawColor(Color.WHITE);
本文标题:自定义view清屏
本文链接:https://www.haomeiwen.com/subject/mpwzvctx.html
网友评论