分组添加封面配置

pull/1226/head
gedoor 3 years ago
parent f04268c9a4
commit 9f4fc59f79
  1. 1
      app/src/main/java/io/legado/app/help/ImageLoader.kt
  2. 1
      app/src/main/java/io/legado/app/ui/book/group/GroupEditDialog.kt
  3. 1
      app/src/main/java/io/legado/app/ui/main/bookshelf/style2/BooksAdapterGrid.kt
  4. 1
      app/src/main/java/io/legado/app/ui/main/bookshelf/style2/BooksAdapterList.kt
  5. 2
      app/src/main/java/io/legado/app/ui/widget/image/CoverImageView.kt
  6. 2
      app/src/main/java/io/legado/app/utils/ActivityResultContractUtils.kt

@ -12,6 +12,7 @@ import io.legado.app.utils.isAbsUrl
import io.legado.app.utils.isContentScheme
import java.io.File
@Suppress("unused")
object ImageLoader {
/**

@ -69,6 +69,7 @@ class GroupEditDialog : BaseDialogFragment() {
} ?: let {
binding.toolBar.title = getString(R.string.add_group)
binding.btnDelete.gone()
binding.ivCover.load()
}
binding.run {
ivCover.onClick {

@ -89,6 +89,7 @@ class BooksAdapterGrid(context: Context, callBack: CallBack) :
val item = callBack.getItem(position)
if (item is BookGroup) {
tvName.text = item.groupName
ivCover.load(item.cover)
}
root.setOnClickListener {
callBack.onItemClick(position)

@ -91,6 +91,7 @@ class BooksAdapterList(context: Context, callBack: CallBack) :
val item = callBack.getItem(position)
if (item is BookGroup) {
tvName.text = item.groupName
ivCover.load(item.cover)
flHasNew.gone()
ivAuthor.gone()
ivLast.gone()

@ -133,7 +133,7 @@ class CoverImageView @JvmOverloads constructor(
}
}
fun load(path: String?, name: String? = null, author: String? = null) {
fun load(path: String? = null, name: String? = null, author: String? = null) {
this.path = path
setText(name, author)
if (AppConfig.useDefaultCover) {

@ -14,7 +14,7 @@ object ActivityResultContractUtils {
override fun createIntent(context: Context, input: Int?): Intent {
requestCode = input
return Intent(Intent.ACTION_GET_CONTENT)
return Intent(Intent.ACTION_OPEN_DOCUMENT)
.addCategory(Intent.CATEGORY_OPENABLE)
.setType("image/*")
}

Loading…
Cancel
Save