Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[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:

  1. Go to ‘Sample of custom activity’
  2. Pick an image from storage or from the camera
  3. Image is displayed correctly
  4. Rotate the screen to landscape (or invoke any other configuration change, e.g. switch device’s theme from light to dark)
  5. 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.


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) {
    setActivityTitle("Adjust Image")

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

Canatocommented, Jan 5, 2022

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

yoijoe4commented, Jan 19, 2022

@samiuelson You are totally right. I forgot to mention that and I have changed my comment accordingly.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found