pull/1395/head
gedoor 3 years ago
parent 9bb372a623
commit bae7094a79
  1. 1
      app/src/main/java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt
  2. 3
      app/src/main/java/io/legado/app/ui/book/read/config/TextFontWeightConverter.kt

@ -177,6 +177,7 @@ class ReadStyleDialog : BaseDialogFragment(), FontSelectDialog.CallBack {
}
private fun upView() = binding.run {
textFontWeightConverter.upUi(ReadBookConfig.textBold)
ReadBook.pageAnim().let {
if (it >= 0 && it < rgPageAnim.childCount) {
rgPageAnim.check(rgPageAnim[it].id)

@ -29,7 +29,8 @@ class TextFontWeightConverter(context: Context, attrs: AttributeSet?) :
}
}
private fun upUi(type: Int) {
@Suppress("MemberVisibilityCanBePrivate")
fun upUi(type: Int) {
spannableString.removeSpan(enabledSpan)
when (type) {
0 -> spannableString.setSpan(enabledSpan, 0, 1, Spannable.SPAN_INCLUSIVE_EXCLUSIVE)

Loading…
Cancel
Save