This commit is contained in:
vakrilov
2015-07-14 18:25:44 +03:00
parent d5687a8e9c
commit dde5fd6d5a
6 changed files with 13 additions and 13 deletions

View File

@ -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();
} }
} }

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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) {

View File

@ -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 {