From 6e9cfbd0c1d586feb49e9c04f110438b6b468e92 Mon Sep 17 00:00:00 2001
From: fengyuecanzhu <1021300691@qq.com>
Date: Fri, 12 Aug 2022 09:51:34 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=9B=AE=E5=BD=95=E6=98=BE?=
=?UTF-8?q?=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.idea/misc.xml | 1 +
.../ui/adapter/ChapterTitleAdapter.java | 8 +++---
.../ui/adapter/holder/CatalogHolder.java | 5 ++++
.../ic_item_category_download.png | Bin 246 -> 0 bytes
.../ic_item_category_normal.png | Bin 246 -> 0 bytes
.../res/drawable/selector_category_load.xml | 25 ------------------
.../res/drawable/selector_category_unload.xml | 25 ------------------
app/src/main/res/layout/item_chapter.xml | 2 +-
8 files changed, 11 insertions(+), 55 deletions(-)
delete mode 100644 app/src/main/res/drawable-xhdpi/ic_item_category_download.png
delete mode 100644 app/src/main/res/drawable-xhdpi/ic_item_category_normal.png
delete mode 100644 app/src/main/res/drawable/selector_category_load.xml
delete mode 100644 app/src/main/res/drawable/selector_category_unload.xml
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 1b55d4c..8a37a45 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -8,6 +8,7 @@
+
diff --git a/app/src/main/java/xyz/fycz/myreader/ui/adapter/ChapterTitleAdapter.java b/app/src/main/java/xyz/fycz/myreader/ui/adapter/ChapterTitleAdapter.java
index 40cfa40..99f7b49 100644
--- a/app/src/main/java/xyz/fycz/myreader/ui/adapter/ChapterTitleAdapter.java
+++ b/app/src/main/java/xyz/fycz/myreader/ui/adapter/ChapterTitleAdapter.java
@@ -74,9 +74,9 @@ public class ChapterTitleAdapter extends ArrayAdapter {
if (convertView == null) {
viewHolder = new ViewHolder();
convertView = LayoutInflater.from(getContext()).inflate(mResourceId, null);
- viewHolder.tvTitle = (TextView) convertView.findViewById(R.id.tv_chapter_title);
- viewHolder.tvTag = (TextView) convertView.findViewById(R.id.tv_tag);
- viewHolder.ivIcon = (ImageView) convertView.findViewById(R.id.iv_icon);
+ viewHolder.tvTitle = convertView.findViewById(R.id.tv_chapter_title);
+ viewHolder.tvTag = convertView.findViewById(R.id.tv_tag);
+ viewHolder.ivIcon = convertView.findViewById(R.id.iv_icon);
convertView.setTag(viewHolder);
} else {
viewHolder = (ViewHolder) convertView.getTag();
@@ -91,7 +91,7 @@ public class ChapterTitleAdapter extends ArrayAdapter {
viewHolder.tvTitle.setText(chapter.getTitle());
//viewHolder.ivIcon.setImageResource(R.drawable.ic_cloud_download);
if (ChapterService.isChapterCached(chapter) || chapter.getEnd() > 0) {
- viewHolder.ivIcon.setVisibility(View.GONE);
+ viewHolder.ivIcon.setVisibility(View.INVISIBLE);
viewHolder.tvTitle.setTextColor(getContext().getResources().getColor(R.color.textPrimary));
} else {
viewHolder.ivIcon.setVisibility(View.VISIBLE);
diff --git a/app/src/main/java/xyz/fycz/myreader/ui/adapter/holder/CatalogHolder.java b/app/src/main/java/xyz/fycz/myreader/ui/adapter/holder/CatalogHolder.java
index 23156c0..6b8f5cf 100644
--- a/app/src/main/java/xyz/fycz/myreader/ui/adapter/holder/CatalogHolder.java
+++ b/app/src/main/java/xyz/fycz/myreader/ui/adapter/holder/CatalogHolder.java
@@ -18,6 +18,8 @@
package xyz.fycz.myreader.ui.adapter.holder;
+import android.view.View;
+import android.widget.ImageView;
import android.widget.TextView;
import androidx.core.content.ContextCompat;
@@ -34,6 +36,7 @@ import xyz.fycz.myreader.greendao.service.ChapterService;
*/
public class CatalogHolder extends ViewHolderImpl {
private TextView tvTitle;
+ private ImageView ivIcon;
@Override
protected int getItemLayoutId() {
return R.layout.item_chapter;
@@ -42,10 +45,12 @@ public class CatalogHolder extends ViewHolderImpl {
@Override
public void initView() {
tvTitle = findById(R.id.tv_chapter_title);
+ ivIcon = findById(R.id.iv_icon);
}
@Override
public void onBind(RecyclerView.ViewHolder holder, Chapter data, int pos) {
tvTitle.setText(data.getTitle());
+ ivIcon.setVisibility(View.GONE);
}
}
diff --git a/app/src/main/res/drawable-xhdpi/ic_item_category_download.png b/app/src/main/res/drawable-xhdpi/ic_item_category_download.png
deleted file mode 100644
index bb61a3cf6fd79a49c2ad91061330bc5f1431e598..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 246
zcmeAS@N?(olHy`uVBq!ia0vp^G9b*s3?yAI>n{URW&u7SuK)l4&)+RVD*AKlxh>EH
zp^_lKU%$85t1(c2Tba4#PIDhwoBVU68k4xYZ)?161
zzVBbt8Q7VrT6p^Yz7(;?cS>~En^YYT5ZKddcrmg|>Tjxx4wtcQYU>R_(RH%h1>5R3
xUl0`Gy1(u8cTSnJzrAwTihbU9@S|`E!v=Yl5RG>qwSX2ec)I$ztaD0e0syflU`hZ0
diff --git a/app/src/main/res/drawable-xhdpi/ic_item_category_normal.png b/app/src/main/res/drawable-xhdpi/ic_item_category_normal.png
deleted file mode 100644
index b4e9b49ec30e70cd2e1f7c17ca6580ee220bd36d..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 246
zcmeAS@N?(olHy`uVBq!ia0vp^G9b*s3?yAI>n{URW&u7SuK)l4KSMe=_odNj5y
v6ydtR?eup}nX|vWa@UG|-goe$a0$Z(d6p23cOSKY7BP6b`njxgN@xNAI{tI)
diff --git a/app/src/main/res/drawable/selector_category_load.xml b/app/src/main/res/drawable/selector_category_load.xml
deleted file mode 100644
index ff1473f..0000000
--- a/app/src/main/res/drawable/selector_category_load.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/drawable/selector_category_unload.xml b/app/src/main/res/drawable/selector_category_unload.xml
deleted file mode 100644
index 15267c1..0000000
--- a/app/src/main/res/drawable/selector_category_unload.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/item_chapter.xml b/app/src/main/res/layout/item_chapter.xml
index 454eb29..3f97495 100644
--- a/app/src/main/res/layout/item_chapter.xml
+++ b/app/src/main/res/layout/item_chapter.xml
@@ -62,7 +62,7 @@
android:contentDescription="@string/success"
android:padding="3.5dp"
android:src="@drawable/ic_cloud_download"
- android:visibility="gone"
+ android:visibility="invisible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"