Re-apply TextBase.formattedText after a style property change

Resolves #1078
This commit is contained in:
Rossen Hristov
2016-02-24 11:07:16 +02:00
parent 026ce23233
commit bda6159bbb
13 changed files with 113 additions and 50 deletions

View File

@@ -0,0 +1,17 @@
import common = require("./text-base-common");
import types = require("utils/types");
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 + "";
this.android.setText(newValue);
}
}
public _setFormattedTextPropertyToNative(value) {
if (this.android) {
this.android.setText(value._formattedText);
}
}
}