diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/BgTextConfigDialog.kt b/app/src/main/java/io/legado/app/ui/book/read/config/BgTextConfigDialog.kt index 69070e27b..a41bf4003 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/config/BgTextConfigDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/BgTextConfigDialog.kt @@ -119,7 +119,7 @@ class BgTextConfigDialog : BaseDialogFragment(), FileChooserDialog.CallBack { headerView.iv_bg.setImageResource(R.drawable.ic_image) headerView.iv_bg.setColorFilter(primaryTextColor) headerView.onClick { selectImage() } - requireContext().assets.list("bg/")?.let { + requireContext().assets.list("bg${File.separator}")?.let { adapter.setItems(it.toList()) } } @@ -194,7 +194,10 @@ class BgTextConfigDialog : BaseDialogFragment(), FileChooserDialog.CallBack { override fun convert(holder: ItemViewHolder, item: String, payloads: MutableList) { with(holder.itemView) { - ImageLoader.load(context, context.assets.open("bg/$item").readBytes()) + ImageLoader.load( + context, + context.assets.open("bg${File.separator}$item").readBytes() + ) .centerCrop() .into(iv_bg) tv_name.setTextColor(secondaryTextColor)