mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00
Renames
This commit is contained in:
@ -49,7 +49,7 @@ export class ActionBar extends view.View implements dts.ActionBar {
|
|||||||
this._navigationButton.actionBar = this;
|
this._navigationButton.actionBar = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.updateActionBar();
|
this.update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,7 +79,7 @@ export class ActionBar extends view.View implements dts.ActionBar {
|
|||||||
this._addView(this._titleView);
|
this._addView(this._titleView);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.updateActionBar();
|
this.update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,7 +111,7 @@ export class ActionBar extends view.View implements dts.ActionBar {
|
|||||||
|
|
||||||
public static onTitleChanged
|
public static onTitleChanged
|
||||||
|
|
||||||
public updateActionBar() {
|
public update() {
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,7 +119,7 @@ export class ActionBar extends view.View implements dts.ActionBar {
|
|||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
public _updateAndroidActionBar(menu: android.view.IMenu) {
|
public _updateAndroid(menu: android.view.IMenu) {
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -232,7 +232,7 @@ export class ActionItems implements dts.ActionItems {
|
|||||||
|
|
||||||
private invalidate() {
|
private invalidate() {
|
||||||
if (this._actionBar) {
|
if (this._actionBar) {
|
||||||
this._actionBar.updateActionBar();
|
this._actionBar.update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -249,7 +249,7 @@ export class ActionItemBase extends bindable.Bindable implements dts.ActionItemB
|
|||||||
private static onItemChanged(data: dependencyObservable.PropertyChangeData) {
|
private static onItemChanged(data: dependencyObservable.PropertyChangeData) {
|
||||||
var menuItem = <ActionItemBase>data.object;
|
var menuItem = <ActionItemBase>data.object;
|
||||||
if (menuItem.actionBar) {
|
if (menuItem.actionBar) {
|
||||||
menuItem.actionBar.updateActionBar();
|
menuItem.actionBar.update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ export class ActionBar extends common.ActionBar {
|
|||||||
this._android = new AndroidActionBarSettings(this);
|
this._android = new AndroidActionBarSettings(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public updateActionBar() {
|
public update() {
|
||||||
if (this.page && this.page.frame && this.page.frame.android && this.page.frame.android.activity) {
|
if (this.page && this.page.frame && this.page.frame.android && this.page.frame.android.activity) {
|
||||||
this.page.frame.android.activity.invalidateOptionsMenu();
|
this.page.frame.android.activity.invalidateOptionsMenu();
|
||||||
}
|
}
|
||||||
@ -102,7 +102,7 @@ export class ActionBar extends common.ActionBar {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _updateAndroidActionBar(menu: android.view.IMenu) {
|
public _updateAndroid(menu: android.view.IMenu) {
|
||||||
var actionBar: android.app.ActionBar = frame.topmost().android.actionBar;
|
var actionBar: android.app.ActionBar = frame.topmost().android.actionBar;
|
||||||
|
|
||||||
this._addActionItems(menu);
|
this._addActionItems(menu);
|
||||||
|
4
ui/action-bar/action-bar.d.ts
vendored
4
ui/action-bar/action-bar.d.ts
vendored
@ -18,10 +18,10 @@
|
|||||||
|
|
||||||
shouldShow(): boolean
|
shouldShow(): boolean
|
||||||
|
|
||||||
updateActionBar();
|
update();
|
||||||
|
|
||||||
//@private
|
//@private
|
||||||
_updateAndroidActionBar(menu: android.view.IMenu);
|
_updateAndroid(menu: android.view.IMenu);
|
||||||
_onAndroidItemSelected(itemId: number): boolean
|
_onAndroidItemSelected(itemId: number): boolean
|
||||||
|
|
||||||
_addArrayFromBuilder(name: string, value: Array<any>): void;
|
_addArrayFromBuilder(name: string, value: Array<any>): void;
|
||||||
|
@ -23,7 +23,7 @@ export class ActionItem extends common.ActionItemBase implements dts.ActionItem
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class ActionBar extends common.ActionBar {
|
export class ActionBar extends common.ActionBar {
|
||||||
public updateActionBar() {
|
public update() {
|
||||||
// Page should be attached to frame to update the action bar.
|
// Page should be attached to frame to update the action bar.
|
||||||
if (!(this.page && this.page.parent)) {
|
if (!(this.page && this.page.parent)) {
|
||||||
return;
|
return;
|
||||||
|
@ -140,7 +140,7 @@ class PageFragmentBody extends android.app.Fragment {
|
|||||||
|
|
||||||
var page: pages.Page = this.entry.resolvedPage;
|
var page: pages.Page = this.entry.resolvedPage;
|
||||||
|
|
||||||
page.actionBar._updateAndroidActionBar(menu);
|
page.actionBar._updateAndroid(menu);
|
||||||
}
|
}
|
||||||
|
|
||||||
onOptionsItemSelected(item: android.view.IMenuItem) {
|
onOptionsItemSelected(item: android.view.IMenuItem) {
|
||||||
|
@ -196,7 +196,7 @@ class UINavigationControllerImpl extends UINavigationController implements UINav
|
|||||||
throw new Error("Page is already shown on another frame.");
|
throw new Error("Page is already shown on another frame.");
|
||||||
}
|
}
|
||||||
|
|
||||||
newPage.actionBar.updateActionBar();
|
newPage.actionBar.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
public navigationControllerDidShowViewControllerAnimated(navigationController: UINavigationController, viewController: UIViewController, animated: boolean): void {
|
public navigationControllerDidShowViewControllerAnimated(navigationController: UINavigationController, viewController: UIViewController, animated: boolean): void {
|
||||||
|
Reference in New Issue
Block a user