mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Initial transitions are ingored on android (as they are on ios) because on API 21+ Transition class requires at least one layout pass before transitions are executed. If we don't ignore it our transition handlers won't execute and frame navigation won't execute because it thinks there is a pending navigation. (#4896)
Fix https://github.com/NativeScript/NativeScript/issues/4895
This commit is contained in:
@@ -140,7 +140,11 @@ export class Frame extends FrameBase {
|
||||
const fragmentTransaction = manager.beginTransaction();
|
||||
|
||||
const animated = this._getIsAnimatedNavigation(backstackEntry.entry);
|
||||
const navigationTransition = this._getNavigationTransition(backstackEntry.entry);
|
||||
// NOTE: Don't use transition for the initial nagivation (same as on iOS)
|
||||
//. On API 21+ transition won't be triggered unless there was at least one
|
||||
// layout pass so we will wait forever for transitionCompleted handler...
|
||||
// https://github.com/NativeScript/NativeScript/issues/4895
|
||||
const navigationTransition = this._currentEntry ? this._getNavigationTransition(backstackEntry.entry) : null;
|
||||
|
||||
_setAndroidFragmentTransitions(animated, navigationTransition, currentFragment, newFragment, fragmentTransaction, manager);
|
||||
if (currentFragment) {
|
||||
|
||||
Reference in New Issue
Block a user