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 7
7
8
8
/**
9
9
* Created by hhristov on 2/27/17.
10
- * Updated by CatchABus on 1/26/25.
11
10
*/
12
11
@ SuppressLint ("ParcelCreator" )
13
12
public class CustomTypefaceSpan extends TypefaceSpan {
13
+ private final Typeface typeface ;
14
+
14
15
public CustomTypefaceSpan (Typeface typeface ) {
15
- super (typeface );
16
+ super ((String )null );
17
+ this .typeface = typeface ;
16
18
}
17
19
18
20
public void updateDrawState (TextPaint ds ) {
@@ -27,7 +29,7 @@ private void applyCustomTypeFace(TextPaint paint) {
27
29
final Typeface old = paint .getTypeface ();
28
30
final int oldStyle = (old == null ) ? 0 : old .getStyle ();
29
31
30
- Typeface typeface = this .getTypeface () ;
32
+ Typeface typeface = this .typeface ;
31
33
int fake = oldStyle & ~typeface .getStyle ();
32
34
if ((fake & android .graphics .Typeface .BOLD ) != 0 ) {
33
35
paint .setFakeBoldText (true );
@@ -39,4 +41,4 @@ private void applyCustomTypeFace(TextPaint paint) {
39
41
40
42
paint .setTypeface (typeface );
41
43
}
42
- }
44
+ }
You can’t perform that action at this time.
0 commit comments