pull/32/head
kunfei 5 years ago
parent 3882705332
commit c16b55b4df
  1. 8
      app/src/main/java/io/legado/app/ui/widget/page/ContentView.kt

@ -2,6 +2,7 @@ package io.legado.app.ui.widget.page
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.content.Context import android.content.Context
import android.graphics.Typeface
import android.graphics.drawable.Drawable import android.graphics.drawable.Drawable
import android.util.AttributeSet import android.util.AttributeSet
import android.widget.FrameLayout import android.widget.FrameLayout
@ -66,6 +67,13 @@ class ContentView : FrameLayout {
tv_bottom_right.setTextColor(it) tv_bottom_right.setTextColor(it)
} }
} }
context.getPrefString("readBookFont")?.let {
if (it.isNotEmpty()) {
content_text_view.typeface = Typeface.createFromFile(it)
} else {
content_text_view.typeface = Typeface.DEFAULT
}
}
} }
fun setBg(bg: Drawable?) { fun setBg(bg: Drawable?) {

Loading…
Cancel
Save