mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Re-apply TextBase.formattedText after a style property change
Resolves #1078
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user