Fix text & fromattedText failing tests

This commit is contained in:
Rossen Hristov
2017-01-12 14:12:41 +02:00
parent eede9c2888
commit cc337094e9
6 changed files with 15 additions and 20 deletions

View File

@@ -28,6 +28,7 @@ export class TextBase extends TextBaseCommon {
let spannableStringBuilder = createSpannableStringBuilder(value);
const text = (spannableStringBuilder === null || spannableStringBuilder === undefined) ? '' : <any>spannableStringBuilder;
this._nativeView.setText(text);
textProperty.nativeValueChange(this, (value === null || value === undefined) ? '' : value.toString());
if (spannableStringBuilder && this._nativeView instanceof android.widget.Button &&
!(this._nativeView.getTransformationMethod() instanceof TextTransformation)){

View File

@@ -49,9 +49,11 @@ export class TextBase extends TextBaseCommon {
let nativeView = this.nativeView;
if (nativeView instanceof UIButton) {
nativeView.setAttributedTitleForState(mas, UIControlState.Normal);
} else {
}
else {
nativeView.attributedText = mas;
}
textProperty.nativeValueChange(this, (value === null || value === undefined) ? '' : value.toString());
}
//Color