Open kurtcarvalho opened 5 years ago
Any update guys? I am also facing the same issue in Android Pie. If you know any workaround, then please let me know.
This can be resolved by the following changes in CropOverlayView
canvas.clipPath(mPath, Region.Op.XOR); //Deprecated
//https://developer.android.com/reference/android/graphics/Canvas#clipPath(android.graphics.Path,%20android.graphics.Region.Op)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
canvas.clipOutPath(mPath);
} else {
canvas.clipPath(mPath, Region.Op.INTERSECT);
}
I hope this will be fixed soon
Its not working
This can be resolved by the following changes in CropOverlayView
canvas.clipPath(mPath, Region.Op.XOR); //Deprecated
//https://developer.android.com/reference/android/graphics/Canvas#clipPath(android.graphics.Path,%20android.graphics.Region.Op)if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { canvas.clipOutPath(mPath); } else { canvas.clipPath(mPath, Region.Op.INTERSECT); }
Its not working
Facing same issue and waiting for new release with fixes.
Facing the same problem but no answers found yet
try this,
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
canvas.clipPath(mPath, Region.Op.INTERSECT); //--- hear...
} else {
canvas.clipPath(mPath, Region.Op.XOR);
}
Full fix here: On CropOverlayView, search and change two following places: Place 1:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
canvas.clipOutPath(mPath);
canvas.clipOutRect(rect);
} else {
canvas.clipPath(mPath, Region.Op.INTERSECT);
canvas.clipRect(rect, Region.Op.XOR);
}
Place 2:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
canvas.clipOutPath(mPath);
} else {
canvas.clipPath(mPath, Region.Op.XOR);
}
At the moment, I had to download zip file to local and import to my project, and fix it myself. Hope admin will fix it as soon as possible.
I am encountering the same issue. I hope this will be fixed soon. Will try VuHongKy's solution otherwise.
No Error message is given but the app crashes in the transition and returns to the screen it was on before the image-cropper is initiated.
`profilePicture?.setOnClickListener { Log.d("CreateProfileFrag","Open picture selection")
The cropper continues to work on lower versions of android. <=8 (Oreo)