[BUG] - Image disappears in `CropImageActivity` after configuration change
See original GitHub issue- Lib Version 4.0.0
- Reproducible in the sample app
Describe the bug
The cropped image disappears in CropImageActivity
on any configuration change (e.g. screen rotation, device theme switch).
To Reproduce Steps to reproduce the behavior in the sample app:
- Go to ‘Sample of custom activity’
- Pick an image from storage or from the camera
- Image is displayed correctly
- Rotate the screen to landscape (or invoke any other configuration change, e.g. switch device’s theme from light to dark)
- Image disappears (it’s not visible also when going back to portrait)
Expected behavior The state (image uri, crop, rotation, etc) should be preserved across configuration changes.
Media
https://user-images.githubusercontent.com/4527432/147878286-ae9f0299-c05a-4fe5-9d89-a3eb0bea1192.mp4
Smartphone (please complete the following information):
- Device: Pixel 4a 5G
- OS: Android API 31
Additional context
Happens both in the sample app, and in my own app using CropImageActivity
launched in the following way:
options(uri = imageUri) {
setGuidelines(CropImageView.Guidelines.ON)
setAllowFlipping(false)
setActivityTitle("Adjust Image")
setCropMenuCropButtonTitle("Save")
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
ImageView crop image disappear when change orientation
I have an activity where I take a picture, crop the image and then show the cropped image. here is my code. public...
Read more >Images disappear when attempting to crop
Reset the tool. Select the tool from the toolbar. After that, go up to the crop icon top left and left click to...
Read more >Image disappears when trying to crop · Issue #27145
Describe the bug While testing #27105 I found that when trying to crop an aligned image the image would disappear.
Read more >Image disappears after cropping | Photoshop Support Group
After cropping the image with crop tool or using 'crop' from the menu the whole image disappears. (I tested it with different images...
Read more >When Event/Pan Cropping, image disappears??
Click on the different category headings to find out more and change our default settings.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey, sorry for the lack of answers here.
I’m on vacation and traveling until 18/01. Just after this I will have the attention of this repository.
Do not need to wait for me, just letting people know as I’m the main maintenance
@samiuelson You are totally right. I forgot to mention that and I have changed my comment accordingly.