MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / activity

Method activity

packages/core/ui/frame/index.android.ts:636–653  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

634 }
635
636 public get activity(): androidx.appcompat.app.AppCompatActivity {
637 const activity: androidx.appcompat.app.AppCompatActivity = this.owner._context;
638 if (activity) {
639 return activity;
640 }
641
642 // traverse the parent chain for an ancestor Frame
643 let currView = this._owner.parent;
644 while (currView) {
645 if (currView instanceof Frame) {
646 return (<Frame>currView).android.activity;
647 }
648
649 currView = currView.parent;
650 }
651
652 return undefined;
653 }
654
655 public get actionBar(): android.app.ActionBar {
656 const activity = this.currentActivity;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected