Skip to content

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

Draft
oleksandr-semenov wants to merge 1 commit intobluelinelabs:developfrom
oleksandr-semenov:prevent_composition_destroy_on_change
Draft

Prevent composition from being destroyed when participating in AndroidX transition#694
oleksandr-semenov wants to merge 1 commit intobluelinelabs:developfrom
oleksandr-semenov:prevent_composition_destroy_on_change

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