Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/app/ui/page/page-tests.android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,6 @@ export var test_Resolve_Fragment_ForPage = function () {
frame.navigate(pageFactory);
TKUnit.waitUntilReady(() => frame.navigationQueueIsEmpty());

const fragment = frame.android.fragmentForPage(testPage);
const fragment = frame.android.fragmentForPage(frame._currentEntry);
TKUnit.assertNotNull(fragment, "Failed to resolve native fragment for page");
}
13 changes: 13 additions & 0 deletions tns-core-modules/application/application.ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,17 +154,30 @@ class IOSApplication implements IOSApplicationDefinition {
let ios = utils.ios.getter(UIApplication, UIApplication.sharedApplication);
let object = this;
notify(<ApplicationEventData>{ eventName: resumeEvent, object, ios });
const content = this._window.content;
if (content && !content.isLoaded) {
content.onLoaded();
}

if (!displayedOnce) {
notify(<ApplicationEventData>{ eventName: displayedEvent, object, ios });
displayedOnce = true;
}
}

private didEnterBackground(notification: NSNotification) {
const content = this._window.content;
if (content && content.isLoaded) {
content.onUnloaded();
}
notify(<ApplicationEventData>{ eventName: suspendEvent, object: this, ios: utils.ios.getter(UIApplication, UIApplication.sharedApplication) });
}

private willTerminate(notification: NSNotification) {
const content = this._window.content;
if (content && content.isLoaded) {
content.onUnloaded();
}
notify(<ApplicationEventData>{ eventName: exitEvent, object: this, ios: utils.ios.getter(UIApplication, UIApplication.sharedApplication) });
}

Expand Down
4 changes: 4 additions & 0 deletions tns-core-modules/ui/frame/fragment.android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ class FragmentClass extends android.app.Fragment {
return result;
}

public onStop(): void {
this._callbacks.onStop(this, super.onStop);
}

public onCreate(savedInstanceState: android.os.Bundle) {
if (!this._callbacks) {
setFragmentCallbacks(this);
Expand Down
Loading