From 9c7e5d9a279c9530227944aeaedfeb4b05d7c009 Mon Sep 17 00:00:00 2001 From: kunfei Date: Thu, 6 Feb 2020 19:39:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/data/entities/Book.kt | 10 +++++----- .../legado/app/ui/book/arrange/ArrangeBookActivity.kt | 6 +++++- .../legado/app/ui/book/arrange/ArrangeBookAdapter.kt | 4 ++++ 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/io/legado/app/data/entities/Book.kt b/app/src/main/java/io/legado/app/data/entities/Book.kt index 0c43860f0..204d2de7a 100644 --- a/app/src/main/java/io/legado/app/data/entities/Book.kt +++ b/app/src/main/java/io/legado/app/data/entities/Book.kt @@ -21,14 +21,14 @@ data class Book( var tocUrl: String = "", // 目录页Url (toc=table of Contents) var origin: String = BookType.local, // 书源URL(默认BookType.local) var originName: String = "", //书源名称 or 本地书籍文件名 - var name: String = "", // 书籍名称(书源获取) - var author: String = "", // 作者名称(书源获取) - override var kind: String? = null, // 分类信息(书源获取) + var name: String = "", // 书籍名称(书源获取) + var author: String = "", // 作者名称(书源获取) + override var kind: String? = null, // 分类信息(书源获取) var customTag: String? = null, // 分类信息(用户修改) var coverUrl: String? = null, // 封面Url(书源获取) var customCoverUrl: String? = null, // 封面Url(用户修改) - var intro: String? = null, // 简介内容(书源获取) - var customIntro: String? = null, // 简介内容(用户修改) + var intro: String? = null, // 简介内容(书源获取) + var customIntro: String? = null, // 简介内容(用户修改) var charset: String? = null, // 自定义字符集名称(仅适用于本地书籍) var type: Int = 0, // @BookType var group: Int = 0, // 自定义分组索引号 diff --git a/app/src/main/java/io/legado/app/ui/book/arrange/ArrangeBookActivity.kt b/app/src/main/java/io/legado/app/ui/book/arrange/ArrangeBookActivity.kt index e985f8c8b..3baabc568 100644 --- a/app/src/main/java/io/legado/app/ui/book/arrange/ArrangeBookActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/arrange/ArrangeBookActivity.kt @@ -71,7 +71,7 @@ class ArrangeBookActivity : VMBaseActivity(R.layout.activi toast(R.string.non_select) return@onClick } - + selectGroup() } } @@ -91,6 +91,10 @@ class ArrangeBookActivity : VMBaseActivity(R.layout.activi }) } + override fun selectGroup() { + + } + override fun upSelectCount() { cb_selected_all.isChecked = adapter.isSelectAll() //重置全选的文字 diff --git a/app/src/main/java/io/legado/app/ui/book/arrange/ArrangeBookAdapter.kt b/app/src/main/java/io/legado/app/ui/book/arrange/ArrangeBookAdapter.kt index 0a4fb5a52..44fdecda7 100644 --- a/app/src/main/java/io/legado/app/ui/book/arrange/ArrangeBookAdapter.kt +++ b/app/src/main/java/io/legado/app/ui/book/arrange/ArrangeBookAdapter.kt @@ -63,6 +63,9 @@ class ArrangeBookAdapter(context: Context, val callBack: CallBack) : tv_delete.onClick { callBack.deleteBook(item.bookUrl) } + tv_group.onClick { + callBack.selectGroup() + } } } @@ -79,5 +82,6 @@ class ArrangeBookAdapter(context: Context, val callBack: CallBack) : val groupList: List fun upSelectCount() fun deleteBook(bookUrl: String) + fun selectGroup() } } \ No newline at end of file