修复阅读背景配置时不显示文字的问题
This commit is contained in:
@@ -25,14 +25,13 @@ class BgAdapter(context: Context, val textColor: Int) :
|
||||
payloads: MutableList<Any>
|
||||
) {
|
||||
binding.run {
|
||||
tvName.text = item.substringBeforeLast(".")
|
||||
ImageLoader.load(
|
||||
context,
|
||||
context.assets.open("bg${File.separator}$item").readBytes()
|
||||
)
|
||||
.centerCrop()
|
||||
.into(ivBg)
|
||||
tvName.setTextColor(textColor)
|
||||
tvName.text = item.substringBeforeLast(".")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ package io.legato.kazusa.ui.book.read.config
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.DialogInterface
|
||||
import android.graphics.PorterDuff
|
||||
import android.net.Uri
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
@@ -115,10 +114,8 @@ class BgTextConfigDialog : BaseBottomSheetDialogFragment(R.layout.dialog_read_bg
|
||||
recyclerView.adapter = adapter
|
||||
adapter.addHeaderView {
|
||||
ItemBgImageBinding.inflate(layoutInflater, it, false).apply {
|
||||
tvName.setTextColor(secondaryTextColor)
|
||||
tvName.text = getString(R.string.select_image)
|
||||
ivBg.setImageResource(R.drawable.ic_image)
|
||||
ivBg.setColorFilter(primaryTextColor, PorterDuff.Mode.SRC_IN)
|
||||
ivBg.setImageResource(R.drawable.ic_add)
|
||||
swUnderline.isGone = ReadBook.book?.isImage == true
|
||||
root.setOnClickListener {
|
||||
selectBgImage.launch()
|
||||
|
||||
Reference in New Issue
Block a user