mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 21:01:34 +08:00
fix(android): fragment 1.3.x issue with transitions
This commit is contained in:
@ -93,6 +93,15 @@ export function _setAndroidFragmentTransitions(animated: boolean, navigationTran
|
|||||||
if (name === 'none') {
|
if (name === 'none') {
|
||||||
const noTransition = new NoTransition(0, null);
|
const noTransition = new NoTransition(0, null);
|
||||||
|
|
||||||
|
if ((<any>androidx.fragment.app.FragmentManager).enableNewStateManager) {
|
||||||
|
// androidx.fragment 1.3.x
|
||||||
|
if (isNestedDefaultTransition) {
|
||||||
|
setTimeout(() => {
|
||||||
|
addToWaitingQueue(newEntry);
|
||||||
|
transitionOrAnimationCompleted(newEntry, null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
// Setup empty/immediate animator when transitioning to nested frame for first time.
|
// Setup empty/immediate animator when transitioning to nested frame for first time.
|
||||||
// Also setup empty/immediate transition to be executed when navigating back to this page.
|
// Also setup empty/immediate transition to be executed when navigating back to this page.
|
||||||
// TODO: Consider removing empty/immediate animator when migrating to official androidx.fragment.app.Fragment:1.2.
|
// TODO: Consider removing empty/immediate animator when migrating to official androidx.fragment.app.Fragment:1.2.
|
||||||
@ -103,6 +112,7 @@ export function _setAndroidFragmentTransitions(animated: boolean, navigationTran
|
|||||||
} else {
|
} else {
|
||||||
setupNewFragmentCustomTransition({ duration: 0, curve: null }, newEntry, noTransition);
|
setupNewFragmentCustomTransition({ duration: 0, curve: null }, newEntry, noTransition);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
newEntry.isNestedDefaultTransition = isNestedDefaultTransition;
|
newEntry.isNestedDefaultTransition = isNestedDefaultTransition;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user