阅读设置布局相关优化 #259
This commit is contained in:
@@ -32,8 +32,12 @@ import io.legado.app.model.CacheBook
|
||||
import io.legado.app.model.ReadBook
|
||||
import io.legado.app.ui.book.read.config.BgTextConfigDialog
|
||||
import io.legado.app.ui.book.read.config.ClickActionConfigDialog
|
||||
import io.legado.app.ui.book.read.config.FontConfigDialog
|
||||
import io.legado.app.ui.book.read.config.FontSelectDialog
|
||||
import io.legado.app.ui.book.read.config.InfoConfigDialog
|
||||
import io.legado.app.ui.book.read.config.PaddingConfigDialog
|
||||
import io.legado.app.ui.book.read.config.PageKeyDialog
|
||||
import io.legado.app.ui.book.read.config.ShadowSetDialog
|
||||
import io.legado.app.ui.file.HandleFileContract
|
||||
import io.legado.app.utils.ColorUtils
|
||||
import io.legado.app.utils.FileDoc
|
||||
@@ -126,10 +130,26 @@ abstract class BaseReadBookActivity :
|
||||
|
||||
}
|
||||
|
||||
fun showPaddingConfig() {
|
||||
fun showInfoConfig() {
|
||||
showDialogFragment<InfoConfigDialog>()
|
||||
}
|
||||
|
||||
fun showFont() {
|
||||
showDialogFragment<FontConfigDialog>()
|
||||
}
|
||||
|
||||
fun showPaddingConfig() {
|
||||
showDialogFragment<PaddingConfigDialog>()
|
||||
}
|
||||
|
||||
fun showShadowSet() {
|
||||
showDialogFragment<ShadowSetDialog>()
|
||||
}
|
||||
|
||||
fun showFontSelect() {
|
||||
showDialogFragment<FontSelectDialog>()
|
||||
}
|
||||
|
||||
fun showBgTextConfig() {
|
||||
showDialogFragment<BgTextConfigDialog>()
|
||||
}
|
||||
|
||||
@@ -75,8 +75,10 @@ import io.legado.app.ui.book.changesource.ChangeChapterSourceDialog
|
||||
import io.legado.app.ui.book.info.BookInfoActivity
|
||||
import io.legado.app.ui.book.read.config.AutoReadDialog
|
||||
import io.legado.app.ui.book.read.config.BgTextConfigDialog.Companion.BG_COLOR
|
||||
import io.legado.app.ui.book.read.config.BgTextConfigDialog.Companion.TEXT_COLOR
|
||||
import io.legado.app.ui.book.read.config.FontSelectDialog.Companion.S_COLOR
|
||||
import io.legado.app.ui.book.read.config.FontConfigDialog
|
||||
import io.legado.app.ui.book.read.config.FontConfigDialog.Companion.TEXT_COLOR
|
||||
import io.legado.app.ui.book.read.config.FontConfigDialog.Companion.S_COLOR
|
||||
import io.legado.app.ui.book.read.config.FontSelectDialog
|
||||
import io.legado.app.ui.book.read.config.ReadAloudDialog
|
||||
import io.legado.app.ui.book.read.config.ReadStyleDialog
|
||||
import io.legado.app.ui.book.read.config.TipConfigDialog.Companion.A_COLOR
|
||||
@@ -160,6 +162,8 @@ class ReadBookActivity : BaseReadBookActivity(),
|
||||
ToolButtonConfigDialog.CallBack,
|
||||
TxtTocRuleDialog.CallBack,
|
||||
ColorPickerDialogListener,
|
||||
FontConfigDialog.CallBack,
|
||||
FontSelectDialog.CallBack,
|
||||
LayoutProgressListener {
|
||||
|
||||
private val tocActivity =
|
||||
@@ -220,6 +224,19 @@ class ReadBookActivity : BaseReadBookActivity(),
|
||||
private val popupAction: PopupAction by lazy {
|
||||
PopupAction(this)
|
||||
}
|
||||
|
||||
// 当前使用的字体路径(给 FontDialog 用)
|
||||
override val curFontPath: String
|
||||
get() = ReadBookConfig.textFont
|
||||
|
||||
// 当选择了字体时被调用
|
||||
override fun selectFont(path: String) {
|
||||
// path 为空表示恢复系统默认字体
|
||||
ReadBookConfig.textFont = path
|
||||
// 通知阅读界面刷新字体
|
||||
postEvent(EventBus.UP_CONFIG, arrayListOf(8, 5))
|
||||
}
|
||||
|
||||
override val isInitFinish: Boolean get() = viewModel.isInitFinish
|
||||
override val isScroll: Boolean get() = binding.readView.isScroll
|
||||
private val isAutoPage get() = binding.readView.isAutoPage
|
||||
|
||||
@@ -57,7 +57,6 @@ import java.io.FileOutputStream
|
||||
class BgTextConfigDialog : BaseBottomSheetDialogFragment(R.layout.dialog_read_bg_text) {
|
||||
|
||||
companion object {
|
||||
const val TEXT_COLOR = 121
|
||||
const val BG_COLOR = 122
|
||||
}
|
||||
|
||||
|
||||
@@ -5,29 +5,23 @@ import android.graphics.Typeface
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import io.legado.app.help.config.ReadBookConfig
|
||||
import androidx.core.net.toUri
|
||||
import androidx.documentfile.provider.DocumentFile
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import com.jaredrummler.android.colorpicker.ColorPickerDialog
|
||||
import io.legado.app.R
|
||||
import io.legado.app.base.BaseBottomSheetDialogFragment
|
||||
import io.legado.app.base.adapter.ItemViewHolder
|
||||
import io.legado.app.base.adapter.RecyclerAdapter
|
||||
import io.legado.app.constant.AppLog
|
||||
import io.legado.app.constant.EventBus
|
||||
import io.legado.app.constant.PreferKey
|
||||
import io.legado.app.databinding.DialogFontSelectBinding
|
||||
import io.legado.app.databinding.ItemFontBinding
|
||||
import io.legado.app.help.config.AppConfig
|
||||
import io.legado.app.help.config.ReadBookConfig.dottedLine
|
||||
import io.legado.app.help.config.ReadBookConfig.underline
|
||||
import io.legado.app.lib.dialogs.SelectItem
|
||||
import io.legado.app.lib.dialogs.alert
|
||||
import io.legado.app.lib.permission.Permissions
|
||||
import io.legado.app.lib.permission.PermissionsCompat
|
||||
import io.legado.app.ui.book.read.config.BgTextConfigDialog.Companion.TEXT_COLOR
|
||||
import io.legado.app.ui.file.HandleFileContract
|
||||
import io.legado.app.utils.FileDoc
|
||||
import io.legado.app.utils.FileUtils
|
||||
@@ -39,8 +33,6 @@ import io.legado.app.utils.invisible
|
||||
import io.legado.app.utils.isContentScheme
|
||||
import io.legado.app.utils.list
|
||||
import io.legado.app.utils.listFileDocs
|
||||
import io.legado.app.utils.observeEvent
|
||||
import io.legado.app.utils.postEvent
|
||||
import io.legado.app.utils.printOnDebug
|
||||
import io.legado.app.utils.putPrefString
|
||||
import io.legado.app.utils.toastOnUi
|
||||
@@ -50,20 +42,15 @@ import kotlinx.coroutines.launch
|
||||
import java.io.File
|
||||
import java.net.URLDecoder
|
||||
|
||||
/**
|
||||
* 字体选择对话框
|
||||
*/
|
||||
class FontSelectDialog : BaseBottomSheetDialogFragment(R.layout.dialog_font_select) {
|
||||
|
||||
companion object {
|
||||
const val S_COLOR = 123
|
||||
}
|
||||
private val fontRegex = Regex("(?i).*\\.[ot]tf")
|
||||
private val binding by viewBinding(DialogFontSelectBinding::bind)
|
||||
private val adapter by lazy {
|
||||
val curFontPath = callBack?.curFontPath ?: ""
|
||||
FontAdapter(requireContext(), curFontPath)
|
||||
}
|
||||
|
||||
private val selectFontDir = registerForActivityResult(HandleFileContract()) {
|
||||
it.uri?.let { uri ->
|
||||
if (uri.isContentScheme()) {
|
||||
@@ -86,22 +73,12 @@ class FontSelectDialog : BaseBottomSheetDialogFragment(R.layout.dialog_font_sele
|
||||
}
|
||||
|
||||
override fun onFragmentCreated(view: View, savedInstanceState: Bundle?) {
|
||||
//binding.toolBar.setBackgroundColor(primaryColor)
|
||||
binding.recyclerView.layoutManager = GridLayoutManager(context, 2)
|
||||
binding.recyclerView.adapter = adapter
|
||||
observeEvent<ArrayList<Int>>(EventBus.UP_CONFIG) { list ->
|
||||
if (list.contains(2)) {
|
||||
binding.btnTextColor.color = ReadBookConfig.durConfig.curTextColor()
|
||||
binding.btnShadowColor.color = ReadBookConfig.durConfig.curTextShadowColor()
|
||||
}
|
||||
}
|
||||
initView()
|
||||
upView()
|
||||
initViewEvent()
|
||||
}
|
||||
|
||||
private fun initView() = binding.run {
|
||||
|
||||
private fun initView() {
|
||||
val fontPath = getPrefString(PreferKey.fontFolder)
|
||||
if (fontPath.isNullOrEmpty()) {
|
||||
openFolder()
|
||||
@@ -117,159 +94,10 @@ class FontSelectDialog : BaseBottomSheetDialogFragment(R.layout.dialog_font_sele
|
||||
loadFontFilesByPermission(fontPath)
|
||||
}
|
||||
}
|
||||
binding.btnTextColor.color = ReadBookConfig.durConfig.curTextColor()
|
||||
binding.swUnderline.isChecked = underline
|
||||
binding.swDottedline.isChecked = dottedLine
|
||||
binding.swDottedline.isEnabled = underline
|
||||
dsbTextLetterSpacing.valueFormat = {
|
||||
((it - 50) / 100f).toString()
|
||||
}
|
||||
dsbLineSize.valueFormat = { ((it - 10) / 10f).toString() }
|
||||
binding.dsbShadowRadius.valueFormat = { "$it px" }
|
||||
binding.dsbShadowDx.valueFormat = { "$it px" }
|
||||
binding.dsbShadowDy.valueFormat = { "$it px" }
|
||||
binding.dsbParagraphSpacing.valueFormat = { value ->
|
||||
(value / 10f).toString()
|
||||
}
|
||||
binding.btnIndentLayout.apply {
|
||||
valueFormat = { value ->
|
||||
value.toString()
|
||||
}
|
||||
onChanged = { value ->
|
||||
val indentCount = value.coerceIn(0, 4)
|
||||
ReadBookConfig.paragraphIndent = " ".repeat(indentCount)
|
||||
postEvent(EventBus.UP_CONFIG, arrayListOf(8, 5))
|
||||
}
|
||||
progress = ReadBookConfig.paragraphIndent.length
|
||||
}
|
||||
|
||||
val weightOptions = context?.resources?.getStringArray(R.array.text_font_weight)
|
||||
val weightValues = listOf(0, 1, 2)
|
||||
val initialIndex = weightValues.indexOf(ReadBookConfig.textBold)
|
||||
|
||||
binding.textFontWeightConverter.text = weightOptions?.getOrNull(initialIndex) ?: "自定义"
|
||||
binding.textFontWeightConverter.setOnClickListener {
|
||||
context?.alert(titleResource = R.string.text_font_weight_converter) {
|
||||
weightOptions?.let { options ->
|
||||
items(options.toList()) { _, i ->
|
||||
ReadBookConfig.textBold = weightValues[i]
|
||||
binding.sliderFontWeight.value =
|
||||
ReadBookConfig.textBold.toFloat().coerceAtLeast(100f)
|
||||
binding.textFontWeightConverter.text = options.getOrNull(i) ?: ""
|
||||
postEvent(EventBus.UP_CONFIG, arrayListOf(8, 9, 6))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
binding.sliderFontWeight.apply {
|
||||
valueFrom = 100f
|
||||
valueTo = 900f
|
||||
stepSize = 1f
|
||||
value = ReadBookConfig.textBold.toFloat().coerceAtLeast(100f)
|
||||
addOnChangeListener { _, newValue, _ ->
|
||||
binding.textFontWeightConverter.text = "自定义"
|
||||
ReadBookConfig.textBold = newValue.toInt()
|
||||
postEvent(EventBus.UP_CONFIG, arrayListOf(8, 9, 6))
|
||||
}
|
||||
}
|
||||
|
||||
binding.btnTextItalic.isChecked = ReadBookConfig.textItalic
|
||||
binding.btnTextShadow.isChecked = ReadBookConfig.textShadow
|
||||
binding.btnShadowColor.color = ReadBookConfig.textShadowColor
|
||||
}
|
||||
|
||||
private fun initViewEvent() = binding.run {
|
||||
dsbTextLetterSpacing.onChanged = {
|
||||
ReadBookConfig.letterSpacing = (it - 50) / 100f
|
||||
postEvent(EventBus.UP_CONFIG, arrayListOf(8, 5))
|
||||
}
|
||||
dsbLineSize.onChanged = {
|
||||
ReadBookConfig.lineSpacingExtra = it
|
||||
postEvent(EventBus.UP_CONFIG, arrayListOf(8, 5))
|
||||
}
|
||||
binding.btnTextColor.setOnClickListener {
|
||||
ColorPickerDialog.newBuilder()
|
||||
.setColor(ReadBookConfig.durConfig.curTextColor())
|
||||
.setShowAlphaSlider(false)
|
||||
.setDialogType(ColorPickerDialog.TYPE_CUSTOM)
|
||||
.setDialogId(TEXT_COLOR)
|
||||
.show(requireActivity())
|
||||
}
|
||||
|
||||
binding.swUnderline.addOnCheckedChangeListener { _, isChecked ->
|
||||
underline = isChecked
|
||||
binding.swDottedline.isEnabled = isChecked
|
||||
if (!isChecked) {
|
||||
dottedLine = false
|
||||
binding.swDottedline.isChecked = false
|
||||
}
|
||||
postEvent(EventBus.UP_CONFIG, arrayListOf(6, 9, 11))
|
||||
}
|
||||
binding.swDottedline.addOnCheckedChangeListener { _, isChecked ->
|
||||
dottedLine = isChecked
|
||||
postEvent(EventBus.UP_CONFIG, arrayListOf(6, 9, 11))
|
||||
}
|
||||
binding.btnDefaultFonts.setOnClickListener {
|
||||
val requireContext = requireContext()
|
||||
alert(titleResource = R.string.system_typeface) {
|
||||
items(
|
||||
requireContext.resources.getStringArray(R.array.system_typefaces).toList()
|
||||
) { _, i ->
|
||||
AppConfig.systemTypefaces = i
|
||||
onDefaultFontChange()
|
||||
dismissAllowingStateLoss()
|
||||
}
|
||||
}
|
||||
}
|
||||
binding.btnOtherDir.setOnClickListener {
|
||||
openFolder()
|
||||
}
|
||||
binding.dsbParagraphSpacing.onChanged = { value ->
|
||||
ReadBookConfig.paragraphSpacing = value
|
||||
postEvent(EventBus.UP_CONFIG, arrayListOf(8, 5))
|
||||
}
|
||||
|
||||
binding.btnTextItalic.addOnCheckedChangeListener { _, isChecked ->
|
||||
ReadBookConfig.textItalic = isChecked
|
||||
postEvent(EventBus.UP_CONFIG, arrayListOf(8, 5))
|
||||
}
|
||||
binding.btnTextShadow.addOnCheckedChangeListener { _, isChecked ->
|
||||
ReadBookConfig.textShadow = isChecked
|
||||
postEvent(EventBus.UP_CONFIG, arrayListOf(8, 5))
|
||||
}
|
||||
binding.dsbShadowRadius.onChanged = {
|
||||
ReadBookConfig.shadowRadius = it.toFloat()
|
||||
postEvent(EventBus.UP_CONFIG, arrayListOf(8, 5))
|
||||
}
|
||||
binding.dsbShadowDx.onChanged = {
|
||||
ReadBookConfig.shadowDx = it.toFloat()
|
||||
postEvent(EventBus.UP_CONFIG, arrayListOf(8, 5))
|
||||
}
|
||||
binding.dsbShadowDy.onChanged = {
|
||||
ReadBookConfig.shadowDy = it.toFloat()
|
||||
postEvent(EventBus.UP_CONFIG, arrayListOf(8, 5))
|
||||
}
|
||||
binding.btnShadowColor.setOnClickListener {
|
||||
ColorPickerDialog.newBuilder()
|
||||
.setColor(ReadBookConfig.config.curTextShadowColor())
|
||||
.setShowAlphaSlider(false)
|
||||
.setDialogType(ColorPickerDialog.TYPE_CUSTOM)
|
||||
.setDialogId(S_COLOR)
|
||||
.show(requireActivity())
|
||||
//postEvent(EventBus.UP_CONFIG, arrayListOf(8, 5))
|
||||
}
|
||||
}
|
||||
|
||||
private fun upView() = binding.run {
|
||||
ReadBookConfig.let {
|
||||
dsbTextLetterSpacing.progress = (it.letterSpacing * 100).toInt() + 50
|
||||
dsbLineSize.progress = it.lineSpacingExtra
|
||||
dsbParagraphSpacing.progress = it.paragraphSpacing
|
||||
binding.dsbShadowRadius.progress = it.shadowRadius.toInt()
|
||||
binding.dsbShadowDx.progress = it.shadowDx.toInt()
|
||||
binding.dsbShadowDy.progress = it.shadowDy.toInt()
|
||||
}
|
||||
}
|
||||
|
||||
private fun openFolder() {
|
||||
|
||||
@@ -10,6 +10,7 @@ import io.legado.app.databinding.DialogReadInfoBinding
|
||||
import io.legado.app.help.config.ReadBookConfig
|
||||
import io.legado.app.help.config.ReadTipConfig
|
||||
import io.legado.app.lib.dialogs.selector
|
||||
import io.legado.app.ui.book.read.ReadBookActivity
|
||||
import io.legado.app.ui.book.read.config.TipConfigDialog.Companion.TIP_COLOR
|
||||
import io.legado.app.ui.book.read.config.TipConfigDialog.Companion.TIP_DIVIDER_COLOR
|
||||
import io.legado.app.utils.getCompatColor
|
||||
@@ -21,6 +22,7 @@ import io.legado.app.utils.viewbindingdelegate.viewBinding
|
||||
class InfoConfigDialog : BaseBottomSheetDialogFragment(R.layout.dialog_read_info) {
|
||||
|
||||
private val binding by viewBinding(DialogReadInfoBinding::bind)
|
||||
private val callBack get() = activity as? ReadBookActivity
|
||||
|
||||
override fun onFragmentCreated(view: View, savedInstanceState: Bundle?) {
|
||||
initView()
|
||||
@@ -55,7 +57,8 @@ class InfoConfigDialog : BaseBottomSheetDialogFragment(R.layout.dialog_read_info
|
||||
}
|
||||
}
|
||||
binding.btnPaddingSetting.setOnClickListener {
|
||||
showDialogFragment<PaddingConfigDialog>()
|
||||
dismissAllowingStateLoss()
|
||||
callBack?.showPaddingConfig()
|
||||
}
|
||||
upTvTipColor()
|
||||
upTvTipDividerColor()
|
||||
|
||||
@@ -27,7 +27,7 @@ import io.legado.app.utils.showDialogFragment
|
||||
import io.legado.app.utils.viewbindingdelegate.viewBinding
|
||||
|
||||
class ReadStyleDialog : BaseBottomSheetDialogFragment(R.layout.dialog_read_book_style),
|
||||
FontSelectDialog.CallBack {
|
||||
FontConfigDialog.CallBack {
|
||||
|
||||
sealed class ReadStyleItem {
|
||||
data class ConfigItem(val config: ReadBookConfig.Config) : ReadStyleItem()
|
||||
@@ -66,10 +66,11 @@ class ReadStyleDialog : BaseBottomSheetDialogFragment(R.layout.dialog_read_book_
|
||||
styleAdapter.addFooterView {
|
||||
ItemReadStyleBinding.inflate(layoutInflater, it, false).apply {
|
||||
tvStyle.text = ""
|
||||
cdStyle.cardElevation = 2f.dpToPx()
|
||||
cdStyle.radius = 32f.dpToPx()
|
||||
cdStyle.strokeWidth = 0
|
||||
cdStyle.cardElevation = 0f
|
||||
cdStyle.radius = 8f.dpToPx()
|
||||
cdStyle.strokeWidth = 1.dpToPx()
|
||||
ivStyle.setImageResource(R.drawable.ic_add)
|
||||
ivStyle.setPadding(12.dpToPx(),12.dpToPx(),12.dpToPx(),12.dpToPx())
|
||||
root.setOnClickListener {
|
||||
ReadBookConfig.configList.add(ReadBookConfig.Config())
|
||||
showBgTextConfig(ReadBookConfig.configList.lastIndex)
|
||||
@@ -100,11 +101,13 @@ class ReadStyleDialog : BaseBottomSheetDialogFragment(R.layout.dialog_read_book_
|
||||
}
|
||||
|
||||
tvTextFont.setOnClickListener {
|
||||
showDialogFragment<FontSelectDialog>()
|
||||
dismissAllowingStateLoss()
|
||||
callBack?.showFont()
|
||||
}
|
||||
|
||||
tvPadding.setOnClickListener {
|
||||
dismissAllowingStateLoss()
|
||||
callBack?.showPaddingConfig()
|
||||
callBack?.showInfoConfig()
|
||||
}
|
||||
tvTip.setOnClickListener {
|
||||
TipConfigDialog().show(childFragmentManager, "tipConfigDialog")
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
package io.legado.app.ui.book.read.config
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import io.legado.app.help.config.ReadBookConfig
|
||||
import io.legado.app.R
|
||||
import io.legado.app.base.BaseBottomSheetDialogFragment
|
||||
import io.legado.app.constant.EventBus
|
||||
import io.legado.app.databinding.DialogShadowSetBinding
|
||||
import io.legado.app.utils.postEvent
|
||||
import io.legado.app.utils.viewbindingdelegate.viewBinding
|
||||
|
||||
/**
|
||||
* 字体选择对话框
|
||||
*/
|
||||
class ShadowSetDialog : BaseBottomSheetDialogFragment(R.layout.dialog_shadow_set) {
|
||||
|
||||
companion object {
|
||||
const val S_COLOR = 123
|
||||
}
|
||||
private val fontRegex = Regex("(?i).*\\.[ot]tf")
|
||||
private val binding by viewBinding(DialogShadowSetBinding::bind)
|
||||
|
||||
override fun onFragmentCreated(view: View, savedInstanceState: Bundle?) {
|
||||
initView()
|
||||
upView()
|
||||
initViewEvent()
|
||||
}
|
||||
|
||||
private fun initView() = binding.run {
|
||||
binding.dsbShadowRadius.valueFormat = { "$it px" }
|
||||
binding.dsbShadowDx.valueFormat = { "$it px" }
|
||||
binding.dsbShadowDy.valueFormat = { "$it px" }
|
||||
}
|
||||
|
||||
private fun initViewEvent() = binding.run {
|
||||
binding.dsbShadowRadius.onChanged = {
|
||||
ReadBookConfig.shadowRadius = it.toFloat()
|
||||
postEvent(EventBus.UP_CONFIG, arrayListOf(8, 5))
|
||||
}
|
||||
binding.dsbShadowDx.onChanged = {
|
||||
ReadBookConfig.shadowDx = it.toFloat()
|
||||
postEvent(EventBus.UP_CONFIG, arrayListOf(8, 5))
|
||||
}
|
||||
binding.dsbShadowDy.onChanged = {
|
||||
ReadBookConfig.shadowDy = it.toFloat()
|
||||
postEvent(EventBus.UP_CONFIG, arrayListOf(8, 5))
|
||||
}
|
||||
}
|
||||
|
||||
private fun upView() = binding.run {
|
||||
ReadBookConfig.let {
|
||||
binding.dsbShadowRadius.progress = it.shadowRadius.toInt()
|
||||
binding.dsbShadowDx.progress = it.shadowDx.toInt()
|
||||
binding.dsbShadowDy.progress = it.shadowDy.toInt()
|
||||
}
|
||||
}
|
||||
|
||||
private val callBack: CallBack?
|
||||
get() = (parentFragment as? CallBack) ?: (activity as? CallBack)
|
||||
|
||||
interface CallBack {
|
||||
fun selectFont(path: String)
|
||||
val curFontPath: String
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,7 @@ import io.legado.app.databinding.DialogTipConfigBinding
|
||||
import io.legado.app.help.config.AppConfig
|
||||
import io.legado.app.help.config.ReadBookConfig
|
||||
import io.legado.app.lib.dialogs.alert
|
||||
import io.legado.app.ui.book.read.ReadBookActivity
|
||||
import io.legado.app.utils.observeEvent
|
||||
import io.legado.app.utils.postEvent
|
||||
import io.legado.app.utils.requestInputMethod
|
||||
|
||||
Reference in New Issue
Block a user