fix(Android): missing transition events with formSheet presentation #2682
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR aligns* events received in element tree between Android and iOS for screens with
presentation: 'formSheet'
.* almost aligns - on iOS when natively dismissed
onDismissed
andonDisappear/transitionEnd
will be received, whereas on Android it will be onlyonDismissed
for now.Adding support for
onDisappear/transitionEnd
requires wider changes in logic which I don't want in incoming 4.7.0 release.Changes
formSheet
animations based on custom animators now have listener set, which emmits appropriate events bypassing "regular" view emitting infrastructure.I've found that
ScreenFragment.onViewAnimation{Start,End}
methods do not work for some reason (isResumed
is false for form sheet) with the sheets, therefore I bypassed it for now.Test code and steps to reproduce
TestAndroidTransition
+ add logs inNativeStackView
inreact-navigation
to see when events are received (or attach appropriate listeners).Checklist