As subject title states the following error occurs:
java.lang.IllegalArgumentException: Invalid Region.Op - only INTERSECT and DIFFERENCE are allowed
When attempting to draw the ElevationImageView on Android P.
This is due to the following line:
canvas.clipRect(rect, Region.Op.REPLACE)
As subject title states the following error occurs: java.lang.IllegalArgumentException: Invalid Region.Op - only INTERSECT and DIFFERENCE are allowed When attempting to draw the ElevationImageView on Android P.
This is due to the following line: canvas.clipRect(rect, Region.Op.REPLACE)
See the following issue on stackoverflow for a suggested replacement: https://stackoverflow.com/questions/50231950/what-is-the-best-alternative-to-canvas-cliprect-with-region-op-replace