mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 19:26:42 +08:00
18 lines
642 B
TypeScript
18 lines
642 B
TypeScript
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.toUIString(data.newValue);
|
|
this.android.setText(newValue);
|
|
}
|
|
}
|
|
public _setFormattedTextPropertyToNative(value) {
|
|
var newText = value ? value._formattedText : null;
|
|
if (this.android) {
|
|
this.android.setText(newText);
|
|
}
|
|
}
|
|
} |