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

Method focus

packages/core/ui/search-bar/index.android.ts:125–139  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

123 }
124
125 public focus(): boolean {
126 const result = super.focus();
127
128 if (result) {
129 if (this.nativeViewProtected) {
130 // Android search view is a view consisted of multiple views, so get the focused view
131 const focusedNativeView = this.nativeViewProtected.findFocus();
132 if (focusedNativeView) {
133 ad.showSoftInput(focusedNativeView);
134 }
135 }
136 }
137
138 return result;
139 }
140
141 public createNativeView() {
142 const nativeView = new androidx.appcompat.widget.SearchView(this._context);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected