From bab2bb13d00f5e4f188cc8e6686f5f657cc04b3d Mon Sep 17 00:00:00 2001 From: Rossen Hristov Date: Mon, 6 Jun 2016 15:44:58 +0300 Subject: [PATCH] More transition fixes and optimizations Related to #2225 --- tns-core-modules/ui/frame/frame.android.ts | 2 +- tns-core-modules/ui/transition/transition.android.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tns-core-modules/ui/frame/frame.android.ts b/tns-core-modules/ui/frame/frame.android.ts index 048a9cc3d..e374812a8 100644 --- a/tns-core-modules/ui/frame/frame.android.ts +++ b/tns-core-modules/ui/frame/frame.android.ts @@ -236,7 +236,7 @@ export class Frame extends frameCommon.Frame { // This bug is fixed on API19+ ensureAnimationFixed(); let trans: number; - if (this.android.cachePagesOnNavigate && animationFixed < 0) { + if (this.android.cachePagesOnNavigate && animationFixed < 0 && !navigationTransition) { // Apparently, there is an Android bug with when hiding fragments with animation. // https://code.google.com/p/android/issues/detail?id=32405 // When bug is fixed use animated variable. diff --git a/tns-core-modules/ui/transition/transition.android.ts b/tns-core-modules/ui/transition/transition.android.ts index cc4fcc38e..f0c51a867 100644 --- a/tns-core-modules/ui/transition/transition.android.ts +++ b/tns-core-modules/ui/transition/transition.android.ts @@ -402,6 +402,7 @@ export function _removePageNativeViewFromAndroidParent(page: Page): void { if (trace.enabled) { trace.write(`REMOVED ${page}._nativeView from its Android parent`, trace.categories.Transition); } + page._onDetached(true); androidParent.removeView(page._nativeView); } }