Fix: SegmentedBar crash using a number as title

Resolves #issue-3210
This commit is contained in:
Rossen Hristov
2016-12-08 13:13:28 +02:00
parent 39007ab05e
commit d05f5f6a2c
3 changed files with 16 additions and 4 deletions

View File

@@ -110,7 +110,7 @@ export class SegmentedBarItem extends common.SegmentedBarItem {
var tabIndex = this._parent.items.indexOf(this);
var titleTextViewId = 16908310; // http://developer.android.com/reference/android/R.id.html#title
var titleTextView = <android.widget.TextView>this._parent.android.getTabWidget().getChildAt(tabIndex).findViewById(titleTextViewId);
titleTextView.setText(this.title || "");
titleTextView.setText(this.title + "");
}
}
}
@@ -162,7 +162,7 @@ export class SegmentedBar extends common.SegmentedBar {
tabItem._parent = this;
var tab = this.android.newTabSpec(this.getValidIndex(index) + "");
tab.setIndicator(tabItem.title || "");
tab.setIndicator(tabItem.title + "");
let that = this;
tab.setContent(new android.widget.TabHost.TabContentFactory({
createTabContent: function (tag: string): android.view.View {