diff --git a/nativescript-core/ui/bottom-navigation/bottom-navigation.android.ts b/nativescript-core/ui/bottom-navigation/bottom-navigation.android.ts index 077a4096c..0f253dfa1 100644 --- a/nativescript-core/ui/bottom-navigation/bottom-navigation.android.ts +++ b/nativescript-core/ui/bottom-navigation/bottom-navigation.android.ts @@ -385,14 +385,14 @@ export class BottomNavigation extends TabNavigationBase { _onAttachedToWindow(): void { super._onAttachedToWindow(); - this._attachedToWindow = true; // _onAttachedToWindow called from OS again after it was detach // TODO: Consider testing and removing it when update to androidx.fragment:1.2.0 if (this._manager && this._manager.isDestroyed()) { return; } - + + this._attachedToWindow = true; this.changeTab(this.selectedIndex); } diff --git a/nativescript-core/ui/frame/frame.android.ts b/nativescript-core/ui/frame/frame.android.ts index e06248e64..286575b3c 100644 --- a/nativescript-core/ui/frame/frame.android.ts +++ b/nativescript-core/ui/frame/frame.android.ts @@ -150,14 +150,14 @@ export class Frame extends FrameBase { _onAttachedToWindow(): void { super._onAttachedToWindow(); - this._attachedToWindow = true; - + // _onAttachedToWindow called from OS again after it was detach // TODO: Consider testing and removing it when update to androidx.fragment:1.2.0 if (this._manager && this._manager.isDestroyed()) { return; } - + + this._attachedToWindow = true; this._processNextNavigationEntry(); }