File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
ui-mobile-base/android/widgets/src/main/java/org/nativescript/widgets Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 77
88/**
99 * Created by hhristov on 2/27/17.
10- * Updated by CatchABus on 1/26/25.
1110 */
1211@ SuppressLint ("ParcelCreator" )
1312public class CustomTypefaceSpan extends TypefaceSpan {
13+ private final Typeface typeface ;
14+
1415 public CustomTypefaceSpan (Typeface typeface ) {
15- super (typeface );
16+ super ((String )null );
17+ this .typeface = typeface ;
1618 }
1719
1820 public void updateDrawState (TextPaint ds ) {
@@ -27,7 +29,7 @@ private void applyCustomTypeFace(TextPaint paint) {
2729 final Typeface old = paint .getTypeface ();
2830 final int oldStyle = (old == null ) ? 0 : old .getStyle ();
2931
30- Typeface typeface = this .getTypeface () ;
32+ Typeface typeface = this .typeface ;
3133 int fake = oldStyle & ~typeface .getStyle ();
3234 if ((fake & android .graphics .Typeface .BOLD ) != 0 ) {
3335 paint .setFakeBoldText (true );
@@ -39,4 +41,4 @@ private void applyCustomTypeFace(TextPaint paint) {
3941
4042 paint .setTypeface (typeface );
4143 }
42- }
44+ }
You can’t perform that action at this time.
0 commit comments