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

Prevent composition from being destroyed when participating in AndroidX transition #694

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

oleksandr-semenov
Copy link

This is just a demo of the required changes.

When ChangeHandler uses AndroidX transition, composition gets ON_DESTROY callback and gets disposed.
After Compose View gets attached again to window overlay it won't restart composition because ViewTreeLifecycle is destroyed.
This causes the view to disappear.

Changes:

  • extend lifecycle till the end of transition
  • dispatch destroy when change is done

Android behavior with a plain project that uses scene transitions and compose views has the same re-start beavahior

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.

1 participant