Fix: setting text in Span to number/null/undefined

This commit is contained in:
vakrilov
2016-04-18 18:32:55 +03:00
parent d7352b7eea
commit fddaf251f7
8 changed files with 88 additions and 8 deletions

View File

@@ -133,7 +133,7 @@ export class EditableTextBase extends common.EditableTextBase {
public _onTextPropertyChanged(data: dependencyObservable.PropertyChangeData) {
if (this._android) {
var newValue = types.isNullOrUndefined(data.newValue) ? "" : data.newValue + "";
var newValue = types.toUIString(data.newValue);
this.android.setText(newValue, android.widget.TextView.BufferType.EDITABLE);
}
}

View File

@@ -5,7 +5,7 @@ import dependencyObservable = require("ui/core/dependency-observable");
export class TextBase extends common.TextBase {
public _onTextPropertyChanged(data: dependencyObservable.PropertyChangeData) {
if (this.android) {
var newValue = types.isNullOrUndefined(data.newValue) ? "" : data.newValue + "";
var newValue = types.toUIString(data.newValue);
this.android.setText(newValue);
}
}

View File

@@ -4,7 +4,7 @@ import dependencyObservable = require("ui/core/dependency-observable");
export class TextBase extends common.TextBase {
public _onTextPropertyChanged(data: dependencyObservable.PropertyChangeData) {
var newValue = types.isNullOrUndefined(data.newValue) ? "" : data.newValue + "";
var newValue = types.toUIString(data.newValue);
this.ios.text = newValue;
this.style._updateTextDecoration();
this.style._updateTextTransform();