fix: multiple android navigation chashes (#5173)

* Fixes multiple android navigation chashes

* Fix page.ios unloaded event when navigated to.

* calling loaded/unloaded from application suspend resume on the rootview
This commit is contained in:
Hristo Hristov
2017-12-14 19:59:30 +02:00
committed by Svetoslav
parent 60773e7545
commit f6907bed2b
10 changed files with 620 additions and 419 deletions

View File

@@ -110,8 +110,9 @@ export class Frame extends View {
/**
* @private
* @param entry to set as current
* @param isBack true when we set current because of back navigation.
*/
setCurrent(entry: BackstackEntry): void;
setCurrent(entry: BackstackEntry, isBack: boolean): void;
/**
* @private
*/
@@ -120,6 +121,10 @@ export class Frame extends View {
* @private
*/
navigationBarHeight: number;
/**
* @private
*/
_currentEntry: BackstackEntry;
/**
* @private
*/
@@ -139,7 +144,7 @@ export class Frame extends View {
/**
* @private
*/
_clearBackStack(): void;
_updateBackstack(entry: BackstackEntry, isBack: boolean): void;
/**
* @private
*/
@@ -300,6 +305,14 @@ export interface BackstackEntry {
* @private
*/
viewSavedState?: any;
/**
* @private
*/
frameId?: number;
/**
* @private
*/
recreated?: boolean;
//@endprivate
}
@@ -360,7 +373,7 @@ export interface AndroidFrame extends Observable {
* Finds the native android.app.Fragment instance created for the specified Page.
* @param page The Page instance to search for.
*/
fragmentForPage(page: Page): any;
fragmentForPage(entry: BackstackEntry): any;
}
export interface AndroidActivityCallbacks {
@@ -382,6 +395,7 @@ export interface AndroidFragmentCallbacks {
onSaveInstanceState(fragment: any, outState: any, superFunc: Function): void;
onDestroyView(fragment: any, superFunc: Function): void;
onDestroy(fragment: any, superFunc: Function): void;
onStop(fragment: any, superFunc: Function): void;
toStringOverride(fragment: any, superFunc: Function): string;
}