Skip to content

Commit

Permalink
[F] bug on android P only INTERSECT and DIFFERENCE are allowed whilu#88
Browse files Browse the repository at this point in the history
  • Loading branch information
anhtuan23 committed Nov 12, 2018
1 parent c88cace commit 8c74618
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,13 @@ private void drawRipple(Canvas canvas){
canvas.clipPath(mPath);
mPath.addRoundRect(mRectF, mBorderRadius, mBorderRadius, Path.Direction.CCW);

canvas.clipPath(mPath, Region.Op.REPLACE);
// bug: https://github.com/whilu/AndroidTagView/issues/88
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
canvas.clipPath(mPath);
} else {
canvas.clipPath(mPath, Region.Op.REPLACE);
}

canvas.drawCircle(mTouchX, mTouchY, mRippleRadius, mRipplePaint);
canvas.restore();
}catch (UnsupportedOperationException e){
Expand Down

0 comments on commit 8c74618

Please sign in to comment.