diff --git a/tns-core-modules/application/application.d.ts b/tns-core-modules/application/application.d.ts index 2c5157be5a..8f1f3bf9ad 100644 --- a/tns-core-modules/application/application.d.ts +++ b/tns-core-modules/application/application.d.ts @@ -80,6 +80,8 @@ export interface LaunchEventData extends ApplicationEventData { * If not set a new Frame will be created as a root view in order to maintain backwards compatibility. */ root?: View; + + savedInstanceState?: any /* android.os.Bundle */; } /** diff --git a/tns-core-modules/ui/core/view-base/view-base.ts b/tns-core-modules/ui/core/view-base/view-base.ts index 129b9b72d1..6953e28f5f 100644 --- a/tns-core-modules/ui/core/view-base/view-base.ts +++ b/tns-core-modules/ui/core/view-base/view-base.ts @@ -217,6 +217,9 @@ export abstract class ViewBase extends Observable implements ViewBaseDefinition // this._disableNativeViewRecycling = true; return this.nativeViewProtected; } + set nativeView(value: any) { + this.setNativeView(value); + } // TODO: Use Type.prototype.typeName instead. get typeName(): string { diff --git a/tns-core-modules/ui/frame/frame.android.ts b/tns-core-modules/ui/frame/frame.android.ts index 528da02c0b..65f93570ae 100644 --- a/tns-core-modules/ui/frame/frame.android.ts +++ b/tns-core-modules/ui/frame/frame.android.ts @@ -610,7 +610,7 @@ class ActivityCallbacksImplementation implements AndroidActivityCallbacks { const app = application.android; const intent = activity.getIntent(); - let rootView = this.notifyLaunch(intent); + let rootView = this.notifyLaunch(intent, savedInstanceState); let frameId = -1; const extras = intent.getExtras(); @@ -670,8 +670,8 @@ class ActivityCallbacksImplementation implements AndroidActivityCallbacks { } @profile - private notifyLaunch(intent: android.content.Intent): View { - const launchArgs: application.LaunchEventData = { eventName: application.launchEvent, object: application.android, android: intent }; + private notifyLaunch(intent: android.content.Intent, savedInstanceState: android.os.Bundle): View { + const launchArgs: application.LaunchEventData = { eventName: application.launchEvent, object: application.android, android: intent, savedInstanceState }; application.notify(launchArgs); return launchArgs.root; }