From d2b31afdf19ec2e51d4344bc2582c30c14830f84 Mon Sep 17 00:00:00 2001 From: fengyuecanzhu <1021300691@qq.com> Date: Sun, 8 Nov 2020 11:17:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AE=89=E5=8D=935=E9=97=AA?= =?UTF-8?q?=E9=80=80bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/assets/updatelog.fy | 4 ++++ .../myreader/ui/activity/ReadActivity.java | 22 ++++++++++--------- .../ui/adapter/BookStoreBookTypeAdapter.java | 4 ++-- .../ui/adapter/ChapterTitleAdapter.java | 2 +- .../myreader/util/utils/SnackbarUtils.java | 4 ++-- app/version_code.properties | 2 +- 6 files changed, 22 insertions(+), 16 deletions(-) diff --git a/app/src/main/assets/updatelog.fy b/app/src/main/assets/updatelog.fy index 39eaa39..83f4ba2 100644 --- a/app/src/main/assets/updatelog.fy +++ b/app/src/main/assets/updatelog.fy @@ -1,3 +1,7 @@ +2020.11.08 +风月读书v1.20.1110811 +1、修复安卓5闪退bug + 2020.11.03 风月读书v1.20.1110312 1、修复已知bug diff --git a/app/src/main/java/xyz/fycz/myreader/ui/activity/ReadActivity.java b/app/src/main/java/xyz/fycz/myreader/ui/activity/ReadActivity.java index 28d7c98..20f238d 100644 --- a/app/src/main/java/xyz/fycz/myreader/ui/activity/ReadActivity.java +++ b/app/src/main/java/xyz/fycz/myreader/ui/activity/ReadActivity.java @@ -276,7 +276,7 @@ public class ReadActivity extends BaseActivity { return; } if (SharedPreUtils.getInstance().getBoolean(getString(R.string.isNightFS), false)) { - mSetting.setDayStyle(!ColorUtil.isColorLight(getColor(R.color.textPrimary))); + mSetting.setDayStyle(!ColorUtil.isColorLight(getResources().getColor(R.color.textPrimary))); } //息屏时间 screenTimeOut = mSetting.getResetScreen() * 60; @@ -473,15 +473,17 @@ public class ReadActivity extends BaseActivity { @Override public boolean onKeyDown(int keyCode, KeyEvent event) { boolean isVolumeTurnPage = SysManager.getSetting().isVolumeTurnPage(); - switch (keyCode) { - case KeyEvent.KEYCODE_VOLUME_UP: - if (isVolumeTurnPage) { - return mPageLoader.skipToPrePage(); - } - case KeyEvent.KEYCODE_VOLUME_DOWN: - if (isVolumeTurnPage) { - return mPageLoader.skipToNextPage(); - } + if (readAblTopMenu.getVisibility() != View.VISIBLE) { + switch (keyCode) { + case KeyEvent.KEYCODE_VOLUME_UP: + if (isVolumeTurnPage) { + return mPageLoader.skipToPrePage(); + } + case KeyEvent.KEYCODE_VOLUME_DOWN: + if (isVolumeTurnPage) { + return mPageLoader.skipToNextPage(); + } + } } return super.onKeyDown(keyCode, event); } diff --git a/app/src/main/java/xyz/fycz/myreader/ui/adapter/BookStoreBookTypeAdapter.java b/app/src/main/java/xyz/fycz/myreader/ui/adapter/BookStoreBookTypeAdapter.java index 0f17413..0c698f1 100644 --- a/app/src/main/java/xyz/fycz/myreader/ui/adapter/BookStoreBookTypeAdapter.java +++ b/app/src/main/java/xyz/fycz/myreader/ui/adapter/BookStoreBookTypeAdapter.java @@ -58,12 +58,12 @@ public class BookStoreBookTypeAdapter extends RecyclerView.Adapter { } else { viewHolder.tvTitle.setCompoundDrawablesWithIntrinsicBounds(getContext().getResources().getDrawable(R.drawable.selector_category_unload), null, null, null); } - viewHolder.tvTitle.setTextColor(getContext().getColor(R.color.textSecondary)); + viewHolder.tvTitle.setTextColor(getContext().getResources().getColor(R.color.textSecondary)); /*if (!setting.isDayStyle()) { viewHolder.tvTitle.setTextColor(getContext().getResources().getColor(R.color.sys_night_word)); viewHolder.vLine.setBackground(getContext().getDrawable(R.color.sys_dialog_setting_line)); diff --git a/app/src/main/java/xyz/fycz/myreader/util/utils/SnackbarUtils.java b/app/src/main/java/xyz/fycz/myreader/util/utils/SnackbarUtils.java index f0d883c..7252c87 100644 --- a/app/src/main/java/xyz/fycz/myreader/util/utils/SnackbarUtils.java +++ b/app/src/main/java/xyz/fycz/myreader/util/utils/SnackbarUtils.java @@ -43,9 +43,9 @@ public class SnackbarUtils { iSnackBarClickEvent.clickEvent(); }); //设置snackBar和titleBar颜色一致 - snackbar.getView().setBackgroundColor(MyApplication.getmContext().getColor(R.color.textPrimary)); + snackbar.getView().setBackgroundColor(MyApplication.getmContext().getResources().getColor(R.color.textPrimary)); //设置action文字的颜色 - snackbar.setActionTextColor(MyApplication.getmContext().getColor(R.color.md_white_1000)); + snackbar.setActionTextColor(MyApplication.getmContext().getResources().getColor(R.color.md_white_1000)); //设置snackBar图标 这里是获取到snackBar的textView 然后给textView增加左边图标的方式来实现的 View snackBarView = snackbar.getView(); TextView textView = snackBarView.findViewById(R.id.snackbar_text); diff --git a/app/version_code.properties b/app/version_code.properties index 5633edb..a93756e 100644 --- a/app/version_code.properties +++ b/app/version_code.properties @@ -1,2 +1,2 @@ -#Tue Nov 03 12:48:10 CST 2020 +#Sun Nov 08 11:10:57 CST 2020 VERSION_CODE=154