From 756d39fb5c4b7d1c988c12f9fd9fdeaee212d649 Mon Sep 17 00:00:00 2001 From: gedoor Date: Sat, 4 Jul 2020 16:58:46 +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 --- .../kunfei/bookshelf/view/adapter/BookShelfGridAdapter.java | 2 +- .../kunfei/bookshelf/view/adapter/BookShelfListAdapter.java | 2 +- .../com/kunfei/bookshelf/view/adapter/BookSourceAdapter.java | 2 +- .../kunfei/bookshelf/view/adapter/ChangeSourceAdapter.java | 2 +- .../com/kunfei/bookshelf/view/adapter/ChoiceBookAdapter.java | 2 +- .../com/kunfei/bookshelf/view/adapter/DownloadAdapter.java | 2 +- .../com/kunfei/bookshelf/view/adapter/FileSystemAdapter.java | 5 +---- .../com/kunfei/bookshelf/view/adapter/FindLeftAdapter.java | 2 +- .../com/kunfei/bookshelf/view/adapter/FindRightAdapter.java | 4 ++-- .../kunfei/bookshelf/view/adapter/ReplaceRuleAdapter.java | 2 +- .../com/kunfei/bookshelf/view/adapter/SearchBookAdapter.java | 2 +- .../bookshelf/view/adapter/SearchBookshelfAdapter.java | 2 +- .../kunfei/bookshelf/view/adapter/SourceDebugAdapter.java | 2 +- .../com/kunfei/bookshelf/view/adapter/SourceEditAdapter.java | 2 +- .../kunfei/bookshelf/view/adapter/TxtChapterRuleAdapter.java | 2 +- 15 files changed, 16 insertions(+), 19 deletions(-) diff --git a/app/src/main/java/com/kunfei/bookshelf/view/adapter/BookShelfGridAdapter.java b/app/src/main/java/com/kunfei/bookshelf/view/adapter/BookShelfGridAdapter.java index 69a8106b44..a0ba9759af 100644 --- a/app/src/main/java/com/kunfei/bookshelf/view/adapter/BookShelfGridAdapter.java +++ b/app/src/main/java/com/kunfei/bookshelf/view/adapter/BookShelfGridAdapter.java @@ -210,7 +210,7 @@ public HashSet getSelected() { return selectList; } - class MyViewHolder extends RecyclerView.ViewHolder { + static class MyViewHolder extends RecyclerView.ViewHolder { CoverImageView ivCover; TextView tvName; BadgeView bvUnread; diff --git a/app/src/main/java/com/kunfei/bookshelf/view/adapter/BookShelfListAdapter.java b/app/src/main/java/com/kunfei/bookshelf/view/adapter/BookShelfListAdapter.java index 1b05477f61..c6a1844c7d 100644 --- a/app/src/main/java/com/kunfei/bookshelf/view/adapter/BookShelfListAdapter.java +++ b/app/src/main/java/com/kunfei/bookshelf/view/adapter/BookShelfListAdapter.java @@ -215,7 +215,7 @@ public HashSet getSelected() { return selectList; } - class MyViewHolder extends RecyclerView.ViewHolder { + static class MyViewHolder extends RecyclerView.ViewHolder { ViewGroup flContent; CoverImageView ivCover; BadgeView bvUnread; diff --git a/app/src/main/java/com/kunfei/bookshelf/view/adapter/BookSourceAdapter.java b/app/src/main/java/com/kunfei/bookshelf/view/adapter/BookSourceAdapter.java index d18317c3f2..104f69a5e8 100644 --- a/app/src/main/java/com/kunfei/bookshelf/view/adapter/BookSourceAdapter.java +++ b/app/src/main/java/com/kunfei/bookshelf/view/adapter/BookSourceAdapter.java @@ -152,7 +152,7 @@ public int getItemCount() { return dataList.size(); } - class MyViewHolder extends RecyclerView.ViewHolder { + static class MyViewHolder extends RecyclerView.ViewHolder { CheckBox cbView; ImageView editView; ImageView delView; diff --git a/app/src/main/java/com/kunfei/bookshelf/view/adapter/ChangeSourceAdapter.java b/app/src/main/java/com/kunfei/bookshelf/view/adapter/ChangeSourceAdapter.java index d40b2a7245..a8d0011f8c 100644 --- a/app/src/main/java/com/kunfei/bookshelf/view/adapter/ChangeSourceAdapter.java +++ b/app/src/main/java/com/kunfei/bookshelf/view/adapter/ChangeSourceAdapter.java @@ -83,7 +83,7 @@ public int getICount() { return allBookBeans.size(); } - class MyViewHolder extends RecyclerView.ViewHolder { + static class MyViewHolder extends RecyclerView.ViewHolder { LinearLayout llContent; TextView tvBookSource; TextView tvLastChapter; diff --git a/app/src/main/java/com/kunfei/bookshelf/view/adapter/ChoiceBookAdapter.java b/app/src/main/java/com/kunfei/bookshelf/view/adapter/ChoiceBookAdapter.java index 8e0df44052..f45c05c30e 100644 --- a/app/src/main/java/com/kunfei/bookshelf/view/adapter/ChoiceBookAdapter.java +++ b/app/src/main/java/com/kunfei/bookshelf/view/adapter/ChoiceBookAdapter.java @@ -134,7 +134,7 @@ public interface Callback { void clickItem(View animView, int position, SearchBookBean searchBookBean); } - class MyViewHolder extends RecyclerView.ViewHolder { + static class MyViewHolder extends RecyclerView.ViewHolder { ViewGroup flContent; CoverImageView ivCover; TextView tvName; diff --git a/app/src/main/java/com/kunfei/bookshelf/view/adapter/DownloadAdapter.java b/app/src/main/java/com/kunfei/bookshelf/view/adapter/DownloadAdapter.java index 07f1537518..73e348440b 100644 --- a/app/src/main/java/com/kunfei/bookshelf/view/adapter/DownloadAdapter.java +++ b/app/src/main/java/com/kunfei/bookshelf/view/adapter/DownloadAdapter.java @@ -125,7 +125,7 @@ public int getItemCount() { return data.size(); } - class MyViewHolder extends RecyclerView.ViewHolder { + static class MyViewHolder extends RecyclerView.ViewHolder { CoverImageView ivCover; TextView tvName; TextView tvDownload; diff --git a/app/src/main/java/com/kunfei/bookshelf/view/adapter/FileSystemAdapter.java b/app/src/main/java/com/kunfei/bookshelf/view/adapter/FileSystemAdapter.java index 7b60073094..a6ea4a6387 100644 --- a/app/src/main/java/com/kunfei/bookshelf/view/adapter/FileSystemAdapter.java +++ b/app/src/main/java/com/kunfei/bookshelf/view/adapter/FileSystemAdapter.java @@ -107,10 +107,7 @@ public void setCheckedAll(boolean isChecked) { private boolean isFileLoaded(String id) { //如果是已加载的文件,则点击事件无效。 - if (BookshelfHelp.getBook(id) != null) { - return true; - } - return false; + return BookshelfHelp.getBook(id) != null; } public int getCheckableCount() { diff --git a/app/src/main/java/com/kunfei/bookshelf/view/adapter/FindLeftAdapter.java b/app/src/main/java/com/kunfei/bookshelf/view/adapter/FindLeftAdapter.java index 0753febbcd..6d09aba3f7 100644 --- a/app/src/main/java/com/kunfei/bookshelf/view/adapter/FindLeftAdapter.java +++ b/app/src/main/java/com/kunfei/bookshelf/view/adapter/FindLeftAdapter.java @@ -75,7 +75,7 @@ public int getItemCount() { return data.size(); } - class MyViewHolder extends RecyclerView.ViewHolder { + static class MyViewHolder extends RecyclerView.ViewHolder { TextView tvSourceName; public MyViewHolder(@NonNull View itemView) { diff --git a/app/src/main/java/com/kunfei/bookshelf/view/adapter/FindRightAdapter.java b/app/src/main/java/com/kunfei/bookshelf/view/adapter/FindRightAdapter.java index 58d01d66ad..1b291d2751 100644 --- a/app/src/main/java/com/kunfei/bookshelf/view/adapter/FindRightAdapter.java +++ b/app/src/main/java/com/kunfei/bookshelf/view/adapter/FindRightAdapter.java @@ -108,7 +108,7 @@ public List getData() { return data; } - class HeaderHolder extends RecyclerView.ViewHolder { + static class HeaderHolder extends RecyclerView.ViewHolder { TextView tv_source_name; HeaderHolder(View itemView) { @@ -117,7 +117,7 @@ class HeaderHolder extends RecyclerView.ViewHolder { } } - class DescHolder extends RecyclerView.ViewHolder { + static class DescHolder extends RecyclerView.ViewHolder { TextView tv_item; DescHolder(View view) { diff --git a/app/src/main/java/com/kunfei/bookshelf/view/adapter/ReplaceRuleAdapter.java b/app/src/main/java/com/kunfei/bookshelf/view/adapter/ReplaceRuleAdapter.java index e31507d05a..eb51580b76 100644 --- a/app/src/main/java/com/kunfei/bookshelf/view/adapter/ReplaceRuleAdapter.java +++ b/app/src/main/java/com/kunfei/bookshelf/view/adapter/ReplaceRuleAdapter.java @@ -94,7 +94,7 @@ public int getItemCount() { return data.size(); } - class MyViewHolder extends RecyclerView.ViewHolder { + static class MyViewHolder extends RecyclerView.ViewHolder { CheckBox checkBox; ImageView editView; ImageView delView; diff --git a/app/src/main/java/com/kunfei/bookshelf/view/adapter/SearchBookAdapter.java b/app/src/main/java/com/kunfei/bookshelf/view/adapter/SearchBookAdapter.java index c6fe245651..43c9cab06f 100644 --- a/app/src/main/java/com/kunfei/bookshelf/view/adapter/SearchBookAdapter.java +++ b/app/src/main/java/com/kunfei/bookshelf/view/adapter/SearchBookAdapter.java @@ -200,7 +200,7 @@ public SearchBookBean getItemData(int pos) { return searchBooks.get(pos); } - class MyViewHolder extends RecyclerView.ViewHolder { + static class MyViewHolder extends RecyclerView.ViewHolder { ViewGroup flContent; CoverImageView ivCover; TextView tvName; diff --git a/app/src/main/java/com/kunfei/bookshelf/view/adapter/SearchBookshelfAdapter.java b/app/src/main/java/com/kunfei/bookshelf/view/adapter/SearchBookshelfAdapter.java index 20ed3e1fd0..167af53677 100644 --- a/app/src/main/java/com/kunfei/bookshelf/view/adapter/SearchBookshelfAdapter.java +++ b/app/src/main/java/com/kunfei/bookshelf/view/adapter/SearchBookshelfAdapter.java @@ -46,7 +46,7 @@ public int getItemCount() { return beans.size(); } - class MyViewHolder extends RecyclerView.ViewHolder { + static class MyViewHolder extends RecyclerView.ViewHolder { TextView textView; public MyViewHolder(@NonNull View itemView) { diff --git a/app/src/main/java/com/kunfei/bookshelf/view/adapter/SourceDebugAdapter.java b/app/src/main/java/com/kunfei/bookshelf/view/adapter/SourceDebugAdapter.java index e36d57bb61..d9b0249b4e 100644 --- a/app/src/main/java/com/kunfei/bookshelf/view/adapter/SourceDebugAdapter.java +++ b/app/src/main/java/com/kunfei/bookshelf/view/adapter/SourceDebugAdapter.java @@ -68,7 +68,7 @@ public int getItemCount() { } - class MyViewHolder extends RecyclerView.ViewHolder { + static class MyViewHolder extends RecyclerView.ViewHolder { TextView textView; public MyViewHolder(@NonNull View itemView) { diff --git a/app/src/main/java/com/kunfei/bookshelf/view/adapter/SourceEditAdapter.java b/app/src/main/java/com/kunfei/bookshelf/view/adapter/SourceEditAdapter.java index 763f0a9c7f..c83b7c28b6 100644 --- a/app/src/main/java/com/kunfei/bookshelf/view/adapter/SourceEditAdapter.java +++ b/app/src/main/java/com/kunfei/bookshelf/view/adapter/SourceEditAdapter.java @@ -91,7 +91,7 @@ public int getItemCount() { } - class MyViewHolder extends RecyclerView.ViewHolder { + static class MyViewHolder extends RecyclerView.ViewHolder { TextInputLayout textInputLayout; AppCompatEditText editText; diff --git a/app/src/main/java/com/kunfei/bookshelf/view/adapter/TxtChapterRuleAdapter.java b/app/src/main/java/com/kunfei/bookshelf/view/adapter/TxtChapterRuleAdapter.java index a3ce62d4ab..85d61d119a 100644 --- a/app/src/main/java/com/kunfei/bookshelf/view/adapter/TxtChapterRuleAdapter.java +++ b/app/src/main/java/com/kunfei/bookshelf/view/adapter/TxtChapterRuleAdapter.java @@ -94,7 +94,7 @@ public int getItemCount() { return data.size(); } - class MyViewHolder extends RecyclerView.ViewHolder { + static class MyViewHolder extends RecyclerView.ViewHolder { CheckBox checkBox; ImageView editView; ImageView delView;