mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Fix: SegmentedBar crash using a number as title
Resolves #issue-3210
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user