NiceImageView icon indicating copy to clipboard operation
NiceImageView copied to clipboard

9.0及以上系统图片一次圆一次方的解决办法

Open uuuBird opened this issue 6 years ago • 6 comments

if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.O_MR1) { canvas.drawPath(path, paint); } else { srcPath.addRect(srcRectF, Path.Direction.CCW); // 计算tempPath和path的差集 srcPath.op(path, Path.Op.DIFFERENCE); canvas.drawPath(srcPath, paint); srcPath.reset();//1 } 再onDraw方法中添加注释1处的代码就好了

uuuBird avatar Dec 27 '19 02:12 uuuBird

if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.O_MR1) { canvas.drawPath(path, paint); } else { srcPath.addRect(srcRectF, Path.Direction.CCW); // 计算tempPath和path的差集 srcPath.op(path, Path.Op.DIFFERENCE); canvas.drawPath(srcPath, paint); srcPath.reset();//1 } 再onDraw方法中添加注释1处的代码就好了

感谢感谢

LYSHIXD avatar Feb 10 '20 15:02 LYSHIXD

if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.O_MR1) { canvas.drawPath(path, paint); } else { srcPath.addRect(srcRectF, Path.Direction.CCW); // 计算tempPath和path的差集 srcPath.op(path, Path.Op.DIFFERENCE); canvas.drawPath(srcPath, paint); srcPath.reset();//1 } 再onDraw方法中添加注释1处的代码就好了

感谢大佬!!!

baikunlong avatar Apr 01 '20 12:04 baikunlong

感谢

wmailn avatar Jul 11 '20 15:07 wmailn

为什么库的作者不修复下呢

df13954 avatar Sep 02 '20 04:09 df13954

if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.O_MR1) { canvas.drawPath(path, paint); } else { srcPath.addRect(srcRectF, Path.Direction.CCW); // 计算tempPath和path的差集 srcPath.op(path, Path.Op.DIFFERENCE); canvas.drawPath(srcPath, paint); srcPath.reset();//1 } 再onDraw方法中添加注释1处的代码就好了

大佬,求告知原因

Jorelanbo avatar May 13 '21 09:05 Jorelanbo