fix(android): resource ID #0xffffffec not found on nav (#6955)

This commit is contained in:
Manol Donev
2019-02-22 15:00:24 +02:00
committed by Svetoslav
parent 65558da708
commit 33d6d1f228

View File

@ -87,19 +87,19 @@ export function _setAndroidFragmentTransitions(
} }
let useLollipopTransition = !!(name && (name.indexOf("slide") === 0 || name === "fade" || name === "explode") && sdkVersion() >= 21); let useLollipopTransition = !!(name && (name.indexOf("slide") === 0 || name === "fade" || name === "explode") && sdkVersion() >= 21);
// [nested frames / fragments] force disable lollipop transitions in case nested fragments // [nested frames / fragments] force disable lollipop transitions in case nested fragments
// are detected as applying dummy animator to the nested fragment with the same duration as // are detected as applying dummy animator to the nested fragment with the same duration as
// the exit animator of the removing parent fragment as a workaround for // the exit animator of the removing parent fragment as a workaround for
// https://code.google.com/p/android/issues/detail?id=55228 works only if custom animations are // https://code.google.com/p/android/issues/detail?id=55228 works only if custom animations are
// used // used
// NOTE: this effectively means you cannot use Explode transition in nested frames scenarios as // NOTE: this effectively means you cannot use Explode transition in nested frames scenarios as
// we have implementations only for slide, fade, and flip // we have implementations only for slide, fade, and flip
if (currentFragment && if (currentFragment &&
currentFragment.getChildFragmentManager() && currentFragment.getChildFragmentManager() &&
currentFragment.getChildFragmentManager().getFragments().toArray().length > 0) { currentFragment.getChildFragmentManager().getFragments().toArray().length > 0) {
useLollipopTransition = false; useLollipopTransition = false;
} }
if (!animated) { if (!animated) {
name = "none"; name = "none";
} else if (transition) { } else if (transition) {
@ -114,8 +114,9 @@ export function _setAndroidFragmentTransitions(
let currentFragmentNeedsDifferentAnimation = false; let currentFragmentNeedsDifferentAnimation = false;
if (currentEntry) { if (currentEntry) {
_updateTransitions(currentEntry); _updateTransitions(currentEntry);
if (currentEntry.transitionName !== name if (currentEntry.transitionName !== name ||
|| currentEntry.transition !== transition) { currentEntry.transition !== transition ||
!useLollipopTransition) {
clearExitAndReenterTransitions(currentEntry, true); clearExitAndReenterTransitions(currentEntry, true);
currentFragmentNeedsDifferentAnimation = true; currentFragmentNeedsDifferentAnimation = true;
} }