From f6fadd2cffc95be49eed3641d872c47d7fb0ae9a Mon Sep 17 00:00:00 2001 From: farfromrefug <> Date: Wed, 18 Sep 2024 15:28:21 +0200 Subject: [PATCH] fix(android): now the properties order is html/text/formattedString(children) --- src/label.android.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/label.android.ts b/src/label.android.ts index 08feecc..7415285 100644 --- a/src/label.android.ts +++ b/src/label.android.ts @@ -470,18 +470,20 @@ export class Label extends LabelBase { if (this.html) { transformedText = this.createHTMLString(); textProperty.nativeValueChange(this, this.html === null || this.html === undefined ? '' : this.html); + } else if (this.text) { + if (this.text instanceof java.lang.CharSequence || this.text instanceof android.text.Spanned) { + transformedText = this.text; + } else { + const text = this.text; + const stringValue = text === null || text === undefined ? '' : text.toString(); + transformedText = getTransformedText(stringValue, this.textTransform); + } } else if (this.formattedText) { transformedText = this.createFormattedTextNative(this.formattedText); textProperty.nativeValueChange( this, this.formattedText === null || this.formattedText === undefined ? '' : this.formattedText.toString() ); - } else if (this.text instanceof java.lang.CharSequence || this.text instanceof android.text.Spanned) { - transformedText = this.text; - } else { - const text = this.text; - const stringValue = text === null || text === undefined ? '' : text.toString(); - transformedText = getTransformedText(stringValue, this.textTransform); } this.nativeTextViewProtected.setLabelText(transformedText); }