diff --git a/packages/core/platforms/android/widgets-release.aar b/packages/core/platforms/android/widgets-release.aar index 65b107f6da..60ded93e90 100644 Binary files a/packages/core/platforms/android/widgets-release.aar and b/packages/core/platforms/android/widgets-release.aar differ diff --git a/packages/ui-mobile-base/android/widgets/src/main/java/org/nativescript/widgets/CustomTypefaceSpan.java b/packages/ui-mobile-base/android/widgets/src/main/java/org/nativescript/widgets/CustomTypefaceSpan.java index fd0d26583f..072cba7261 100644 --- a/packages/ui-mobile-base/android/widgets/src/main/java/org/nativescript/widgets/CustomTypefaceSpan.java +++ b/packages/ui-mobile-base/android/widgets/src/main/java/org/nativescript/widgets/CustomTypefaceSpan.java @@ -7,12 +7,14 @@ /** * Created by hhristov on 2/27/17. - * Updated by CatchABus on 1/26/25. */ @SuppressLint("ParcelCreator") public class CustomTypefaceSpan extends TypefaceSpan { + private final Typeface typeface; + public CustomTypefaceSpan(Typeface typeface) { - super(typeface); + super((String)null); + this.typeface = typeface; } public void updateDrawState(TextPaint ds) { @@ -27,7 +29,7 @@ private void applyCustomTypeFace(TextPaint paint) { final Typeface old = paint.getTypeface(); final int oldStyle = (old == null) ? 0 : old.getStyle(); - Typeface typeface = this.getTypeface(); + Typeface typeface = this.typeface; int fake = oldStyle & ~typeface.getStyle(); if ((fake & android.graphics.Typeface.BOLD) != 0) { paint.setFakeBoldText(true); @@ -39,4 +41,4 @@ private void applyCustomTypeFace(TextPaint paint) { paint.setTypeface(typeface); } -} +} \ No newline at end of file