修复安卓5闪退bug

pull/5/head
fengyuecanzhu 4 years ago
parent 255f608898
commit d2b31afdf1
  1. 4
      app/src/main/assets/updatelog.fy
  2. 22
      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
风月读书v1.20.1110312
1、修复已知bug

@ -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);
}

@ -58,12 +58,12 @@ public class BookStoreBookTypeAdapter extends RecyclerView.Adapter<BookStoreBook
initView(position, holder);
if (position == selectPos) {
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.getPaint().setFakeBoldText(true);
} else {
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.setTextSize(14);
}

@ -71,7 +71,7 @@ public class ChapterTitleAdapter extends ArrayAdapter<Chapter> {
} 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));

@ -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);

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

Loading…
Cancel
Save