Doesn't work if i choose second image after the first image has been croppedSee original GitHub issue
I am using the activity flow of cropping an image. I start the cropper activity by using
CropImage.activity(uri) .setGuidelines(CropImageView.Guidelines.ON) .setOutputUri(outputUri) .start(this);
and gets the cropped image which i then passes on to another which renders it perfectly. but when i get back to the previous activity which is responsible for using the image, i again starts the cropper activity using the above code. The cropper activity launches but it shows a blank screen with a loader in the center which keeps on loading for like infinity.
- Created 7 years ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
In my case, I didn’t use
AsyncTask by myself, I used facebook ad sdk to show an ad in previous page of cropper, the loading of the ad was slow, and it blocked the cropper’s loading, so I guess it used
AsyncTask too, I can’t control it.
I suggest you can call
executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR) which can simply execute tasks in parallel.
This is because
BitmapLoadingWorkerTask is extend
AsyncTask, and every instance of
AsyncTask is using the same serial executor by default. When our app use
AsyncTask first in other place, then open crop page,
BitmapLoadingWorkerTask has to wait to execute until other instance of
AsyncTask’s execution finished. I think the author should execute
BitmapLoadingWorkerTask on a custom non-serial executor.