Skip to content

Commit

Permalink
fix: ActionBar's title not updating in OnLoaded event
Browse files Browse the repository at this point in the history
  • Loading branch information
zh-m committed Jul 15, 2016
1 parent b07dd30 commit 1d63103
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions tns-core-modules/ui/action-bar/action-bar.android.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import common = require("./action-bar-common");
import frame = require("ui/frame");
import types = require("utils/types");
import enums = require("ui/enums");
import application = require("application");
Expand Down Expand Up @@ -50,7 +49,7 @@ export class ActionItem extends common.ActionItem {
private _itemId;
constructor() {
super();
this._itemId = generateItemId();
this._itemId = generateItemId();
}

public get android(): dts.AndroidActionItemSettings {
Expand Down Expand Up @@ -171,7 +170,7 @@ export class ActionBar extends common.ActionBar {
this.navigationButton._raiseTap();
return true;
}

// Find item with the right ID;
var menuItem: dts.ActionItem = undefined;
var items = this.actionItems.getItems();
Expand Down Expand Up @@ -301,15 +300,13 @@ export class ActionBar extends common.ActionBar {
}

public _onTitlePropertyChanged() {
var topFrame = frame.topmost();
if (this._toolbar && topFrame && topFrame.currentPage === this.page) {
if (this._toolbar) {
this._updateTitleAndTitleView();
}
}

public _onIconPropertyChanged() {
var topFrame = frame.topmost();
if (this._toolbar && topFrame && topFrame.currentPage === this.page) {
if (this._toolbar) {
this._updateIcon();
}
}
Expand Down

0 comments on commit 1d63103

Please sign in to comment.