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

@@ -1,5 +1,6 @@
import common = require("./button-common");
import utils = require("utils/utils")
import dependencyObservable = require("ui/core/dependency-observable");
global.moduleMerge(common, exports);
@@ -36,4 +37,16 @@ export class Button extends common.Button {
}
}));
}
public _onTextPropertyChanged(data: dependencyObservable.PropertyChangeData) {
if (this.android) {
this.android.setText(data.newValue + "");
}
}
public _setFormattedTextPropertyToNative(value) {
if (this.android) {
this.android.setText(value._formattedText);
}
}
}