Fixes crash with font loading

kmm_hh
Laurent 5 years ago
parent cb228b8fb1
commit 1484ed2f74
  1. 8
      app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/replayer/TableDrawer.kt

@ -63,12 +63,16 @@ class TableDrawer {
textPaint.color = context.getColor(R.color.white)
textPaint.textAlign = Paint.Align.CENTER
textPaint.isAntiAlias = true
textPaint.typeface = ResourcesCompat.getFont(context, R.font.roboto_bold)
cardTextPaint.color = context.getColor(R.color.black)
cardTextPaint.typeface = ResourcesCompat.getFont(context, R.font.roboto_bold)
cardTextPaint.textAlign = Paint.Align.CENTER
cardTextPaint.isAntiAlias = true
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
textPaint.typeface = ResourcesCompat.getFont(context, R.font.roboto_bold)
cardTextPaint.typeface = ResourcesCompat.getFont(context, R.font.roboto_bold)
}
}
fun drawTable(canvas: Canvas, context: Context) {

Loading…
Cancel
Save