Skip to content

fix(android): Formatted string NoSuchMethodError #10704

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified packages/core/platforms/android/widgets-release.aar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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);
Expand All @@ -39,4 +41,4 @@ private void applyCustomTypeFace(TextPaint paint) {

paint.setTypeface(typeface);
}
}
}