修复安卓5闪退bug

pull/5/head
fengyuecanzhu 4 years ago
parent 255f608898
commit d2b31afdf1
  1. 4
      app/src/main/assets/updatelog.fy
  2. 4
      app/src/main/java/xyz/fycz/myreader/ui/activity/ReadActivity.java
  3. 4
      app/src/main/java/xyz/fycz/myreader/ui/adapter/BookStoreBookTypeAdapter.java
  4. 2
      app/src/main/java/xyz/fycz/myreader/ui/adapter/ChapterTitleAdapter.java
  5. 4
      app/src/main/java/xyz/fycz/myreader/util/utils/SnackbarUtils.java
  6. 2
      app/version_code.properties

@ -1,3 +1,7 @@
2020.11.08
风月读书v1.20.1110811
1、修复安卓5闪退bug
2020.11.03 2020.11.03
风月读书v1.20.1110312 风月读书v1.20.1110312
1、修复已知bug 1、修复已知bug

@ -276,7 +276,7 @@ public class ReadActivity extends BaseActivity {
return; return;
} }
if (SharedPreUtils.getInstance().getBoolean(getString(R.string.isNightFS), false)) { 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; screenTimeOut = mSetting.getResetScreen() * 60;
@ -473,6 +473,7 @@ public class ReadActivity extends BaseActivity {
@Override @Override
public boolean onKeyDown(int keyCode, KeyEvent event) { public boolean onKeyDown(int keyCode, KeyEvent event) {
boolean isVolumeTurnPage = SysManager.getSetting().isVolumeTurnPage(); boolean isVolumeTurnPage = SysManager.getSetting().isVolumeTurnPage();
if (readAblTopMenu.getVisibility() != View.VISIBLE) {
switch (keyCode) { switch (keyCode) {
case KeyEvent.KEYCODE_VOLUME_UP: case KeyEvent.KEYCODE_VOLUME_UP:
if (isVolumeTurnPage) { if (isVolumeTurnPage) {
@ -483,6 +484,7 @@ public class ReadActivity extends BaseActivity {
return mPageLoader.skipToNextPage(); return mPageLoader.skipToNextPage();
} }
} }
}
return super.onKeyDown(keyCode, event); return super.onKeyDown(keyCode, event);
} }

@ -58,12 +58,12 @@ public class BookStoreBookTypeAdapter extends RecyclerView.Adapter<BookStoreBook
initView(position, holder); initView(position, holder);
if (position == selectPos) { if (position == selectPos) {
holder.itemView.setBackgroundResource(R.color.colorForeground); holder.itemView.setBackgroundResource(R.color.colorForeground);
holder.tvTypeName.setTextColor(mContext.getColor(R.color.textPrimary)); holder.tvTypeName.setTextColor(mContext.getResources().getColor(R.color.textPrimary));
holder.tvTypeName.setTextSize(15); holder.tvTypeName.setTextSize(15);
holder.tvTypeName.getPaint().setFakeBoldText(true); holder.tvTypeName.getPaint().setFakeBoldText(true);
} else { } else {
holder.itemView.setBackgroundResource(R.color.colorBackground); holder.itemView.setBackgroundResource(R.color.colorBackground);
holder.tvTypeName.setTextColor(mContext.getColor(R.color.textSecondary)); holder.tvTypeName.setTextColor(mContext.getResources().getColor(R.color.textSecondary));
holder.tvTypeName.getPaint().setFakeBoldText(false); holder.tvTypeName.getPaint().setFakeBoldText(false);
holder.tvTypeName.setTextSize(14); holder.tvTypeName.setTextSize(14);
} }

@ -71,7 +71,7 @@ public class ChapterTitleAdapter extends ArrayAdapter<Chapter> {
} else { } else {
viewHolder.tvTitle.setCompoundDrawablesWithIntrinsicBounds(getContext().getResources().getDrawable(R.drawable.selector_category_unload), null, null, null); 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()) { /*if (!setting.isDayStyle()) {
viewHolder.tvTitle.setTextColor(getContext().getResources().getColor(R.color.sys_night_word)); viewHolder.tvTitle.setTextColor(getContext().getResources().getColor(R.color.sys_night_word));
viewHolder.vLine.setBackground(getContext().getDrawable(R.color.sys_dialog_setting_line)); viewHolder.vLine.setBackground(getContext().getDrawable(R.color.sys_dialog_setting_line));

@ -43,9 +43,9 @@ public class SnackbarUtils {
iSnackBarClickEvent.clickEvent(); iSnackBarClickEvent.clickEvent();
}); });
//设置snackBar和titleBar颜色一致 //设置snackBar和titleBar颜色一致
snackbar.getView().setBackgroundColor(MyApplication.getmContext().getColor(R.color.textPrimary)); snackbar.getView().setBackgroundColor(MyApplication.getmContext().getResources().getColor(R.color.textPrimary));
//设置action文字的颜色 //设置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增加左边图标的方式来实现的 //设置snackBar图标 这里是获取到snackBar的textView 然后给textView增加左边图标的方式来实现的
View snackBarView = snackbar.getView(); View snackBarView = snackbar.getView();
TextView textView = snackBarView.findViewById(R.id.snackbar_text); TextView textView = snackBarView.findViewById(R.id.snackbar_text);

@ -1,2 +1,2 @@
#Tue Nov 03 12:48:10 CST 2020 #Sun Nov 08 11:10:57 CST 2020
VERSION_CODE=154 VERSION_CODE=154

Loading…
Cancel
Save