| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -87,19 +87,19 @@ export function _setAndroidFragmentTransitions( | |||
| 87 | 87 | } | |
| 88 | 88 | ||
| 89 | 89 | let useLollipopTransition = !!(name && (name.indexOf("slide") === 0 || name === "fade" || name === "explode") && sdkVersion() >= 21); | |
| 90 | - // [nested frames / fragments] force disable lollipop transitions in case nested fragments | ||
| 91 | - // are detected as applying dummy animator to the nested fragment with the same duration as | ||
| 92 | - // the exit animator of the removing parent fragment as a workaround for | ||
| 90 | + // [nested frames / fragments] force disable lollipop transitions in case nested fragments | ||
| 91 | + // are detected as applying dummy animator to the nested fragment with the same duration as | ||
| 92 | + // the exit animator of the removing parent fragment as a workaround for | ||
| 93 | 93 | // https://code.google.com/p/android/issues/detail?id=55228 works only if custom animations are | |
| 94 | 94 | // used | |
| 95 | 95 | // NOTE: this effectively means you cannot use Explode transition in nested frames scenarios as | |
| 96 | 96 | // we have implementations only for slide, fade, and flip | |
| 97 | - if (currentFragment && | ||
| 97 | + if (currentFragment && | ||
| 98 | 98 | currentFragment.getChildFragmentManager() && | |
| 99 | 99 | currentFragment.getChildFragmentManager().getFragments().toArray().length > 0) { | |
| 100 | 100 | useLollipopTransition = false; | |
| 101 | 101 | } | |
| 102 | - | ||
| 102 | + | ||
| 103 | 103 | if (!animated) { | |
| 104 | 104 | name = "none"; | |
| 105 | 105 | } else if (transition) { | |
@@ -114,8 +114,9 @@ export function _setAndroidFragmentTransitions( | |||
| 114 | 114 | let currentFragmentNeedsDifferentAnimation = false; | |
| 115 | 115 | if (currentEntry) { | |
| 116 | 116 | _updateTransitions(currentEntry); | |
| 117 | - if (currentEntry.transitionName !== name | ||
| 118 | - || currentEntry.transition !== transition) { | ||
| 117 | + if (currentEntry.transitionName !== name || | ||
| 118 | + currentEntry.transition !== transition || | ||
| 119 | + !useLollipopTransition) { | ||
| 119 | 120 | clearExitAndReenterTransitions(currentEntry, true); | |
| 120 | 121 | currentFragmentNeedsDifferentAnimation = true; | |
| 121 | 122 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments