Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve state across configuration changes #335

Conversation

ClouddJR
Copy link
Contributor

close #296

Bug

Cause:

  1. Inside the CropImageActivity the latestTmpUri variable is reset during configuration changes (such as rotation).
  2. The CropImageView incorrectly saves the current bitmap uri inside the onSaveStateInstance().

How the bug was solved:

  1. The latestTmpUri is now saved inside the onSaveInstanceState().
  2. I modified the code according to the original code here. Besides, the saveInstanceStateBitmapUri variable is no longer needed. It seems that the customOutputUri is used in its place now.

@ClouddJR ClouddJR requested a review from a team as a code owner March 18, 2022 13:51
@ClouddJR ClouddJR changed the title Feature/preserve state across configuration changes Preserve state across configuration changes Mar 18, 2022
@Canato
Copy link
Member

Canato commented Mar 18, 2022

On holidays, back next week and will review this.

Thanks for the PR =D

Copy link
Member

@Canato Canato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work. We just need the CHANGELOG update to merge this.

@Canato Canato merged commit 455920d into CanHub:main Mar 21, 2022
@ClouddJR ClouddJR deleted the feature/preserve-state-across-configuration-changes branch March 21, 2022 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] - Image disappears in CropImageActivity after configuration change
2 participants