ArthurHub / ArthurHub/Android-Image-Cropper
getCroppedImage clears the zoom animation
- Dominant language
- Java
- Stars
- 6.4k
- Forks
- 1.4k
- PR merge metrics
- No merged PRs in 30d
Description
I'm trying to use `getCroppedImage` to give the user small "previews" of what various actions will do (like, a little rotated thumbnail on the rotate image button). I update those previews after the user pans or zooms the view.
Calling `getCroppedImage` cancels/clears the zoom animation. The result is that the overlay rect is updated but the underlying image is not -- the rect then no longer visually describes the crop area.
Is the clear call necessary? For now I've started calling `getCroppedImage` in 301 ms so it runs just after the `CropImageAnimation` completes, but that's obviously pretty hacky.
CropImageView.java:
public Bitmap getCroppedImage(int reqWidth, int reqHeight, RequestSizeOptions options) {
Bitmap croppedBitmap = null;
if (mBitmap != null) {
mImageView.clearAnimation(); // <--
If it is necessary may I propose immediately moving to the end state of the animation so the `ImageView` is updated as intended?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.