diff --git a/apps/ui-tests-app/css/decoration-transform-formattedtext.xml b/apps/ui-tests-app/css/decoration-transform-formattedtext.xml
index d8eb2c6bf..907492a0b 100644
--- a/apps/ui-tests-app/css/decoration-transform-formattedtext.xml
+++ b/apps/ui-tests-app/css/decoration-transform-formattedtext.xml
@@ -12,6 +12,16 @@
+
+
@@ -36,6 +56,16 @@
+
+
+
+
+
+
+
+
+
+
@@ -48,6 +78,16 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ui/button/button.android.ts b/ui/button/button.android.ts
index d80a2d163..fbe2593da 100644
--- a/ui/button/button.android.ts
+++ b/ui/button/button.android.ts
@@ -26,16 +26,16 @@ export class Button extends common.Button {
this._android.setOnClickListener(new android.view.View.OnClickListener(
{
- get owner() {
- return that.get();
- },
+ get owner() {
+ return that.get();
+ },
- onClick: function (v) {
- if (this.owner) {
- this.owner._emit(common.Button.tapEvent);
+ onClick: function(v) {
+ if (this.owner) {
+ this.owner._emit(common.Button.tapEvent);
+ }
}
- }
- }));
+ }));
}
public _onTextPropertyChanged(data: dependencyObservable.PropertyChangeData) {
@@ -44,9 +44,21 @@ export class Button extends common.Button {
}
}
+ private _transformationMethod;
public _setFormattedTextPropertyToNative(value) {
var newText = value ? value._formattedText : null;
if (this.android) {
+ if (newText) {
+ if (!this._transformationMethod) {
+ this._transformationMethod = this.android.getTransformationMethod();
+ }
+ this.android.setTransformationMethod(null);
+ } else {
+ if (this._transformationMethod && !this.android.getTransformationMethod()) {
+ this.android.setTransformationMethod(this._transformationMethod);
+ }
+ }
+
this.android.setText(newText);
}
}