Skip to content
New issue

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

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

Already on GitHub? # 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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant