MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / update

Method update

packages/core/ui/action-bar/index.android.ts:195–221  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

193 }
194
195 public update() {
196 if (!this.nativeViewProtected) {
197 return;
198 }
199
200 const page = this.page;
201 if (!page.frame || !page.frame._getNavBarVisible(page)) {
202 this.nativeViewProtected.setVisibility(android.view.View.GONE);
203
204 // If action bar is hidden - no need to fill it with items.
205 return;
206 }
207
208 this.nativeViewProtected.setVisibility(android.view.View.VISIBLE);
209
210 // Add menu items
211 this._addActionItems();
212
213 // Set title
214 this._updateTitleAndTitleView();
215
216 // Set home icon
217 this._updateIcon();
218
219 // Set navigation button
220 this._updateNavigationButton();
221 }
222
223 public _onAndroidItemSelected(itemId: number): boolean {
224 // Handle home button

Callers 1

onLoadedMethod · 0.95

Calls 5

_addActionItemsMethod · 0.95
_updateIconMethod · 0.95
_getNavBarVisibleMethod · 0.45

Tested by

no test coverage detected