Android-Image-Cropper: [BUG] - setOnCropImageCompleteListener does not work
- Lib Version 3.3.6
Describe the bug setOnCropImageCompleteListener does not work Lambda function never gets called.
To Reproduce use the CropImageView, then: create a Lambda function:
binding.cropImageView.setOnCropImageCompleteListener{ view, result ->
Log.d("imageComplete", "does this even get called")
}
notice that it never gets called when moving and scaling the crop region.
Expected behavior Lambda should get called when releasing the cropping rectangle so that the selected region can be automatically refreshed into i.E. a Preview Drawable
Media

Smartphone (please complete the following information):
- Device: Xiaomi Mix 2S and Pixel 4 Emulator
- OS: Android 10 MIUI 12.5 and Android 10 with Play Services
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 16 (16 by maintainers)
Commits related to this issue
- resolve shadow bug (issue #261) — committed to kingspride/Android-Image-Cropper by kingspride 2 years ago
- resolve shadow bug (issue #261) (#319) — committed to CanHub/Android-Image-Cropper by kingspride 2 years ago
Yeah I think its a misunderstanding. sorry. I’ll come back when I did more debugging.
… I just wanted to add that the zoom gets applied when dragging the cropping rectangle to an edge - maybe this helps finding the root cause 😉
Exactly, I can reproduce this some times on normal usage, so I’m sure is not related to this listener =|
But is some pain to fix this, since is not consistent, but maybe is consistent with
setOnSetCropOverlayReleasedListenerwhat will make easier to fix, I will try to check on Friday/Saturday @@