fix some NullPointerExceptions with Flower Finder test apk

This commit is contained in:
Julian Winkler
2023-10-14 11:13:10 +02:00
committed by Mis012
parent 37d9b13470
commit 399cf87254
2 changed files with 4 additions and 2 deletions

View File

@@ -42,6 +42,7 @@ public class Paint {
if(skia_font == 0)
skia_font = native_create_font();
if (typeface != null)
native_set_typeface(skia_font, typeface.skia_typeface);
return this.typeface;
}

View File

@@ -81,6 +81,7 @@ public class TextView extends View {
native_setTextColor(color);
}
public void setTextColor(ColorStateList colors) {
if (colors != null)
setTextColor(colors.getDefaultColor()); // TODO: do this properly
}
public void setTextSize(int unit, float size) {}