兼容第三方书源

pull/5/head v1.9.6-beta
fengyuecanzhu 4 years ago
parent 58a25047d5
commit acd099f97f
  1. 2
      app/build.gradle
  2. 1
      app/src/main/assets/updatelog.fy
  3. 1
      app/src/main/java/xyz/fycz/myreader/base/adapter/BaseListAdapter.java
  4. 2
      app/src/main/java/xyz/fycz/myreader/ui/activity/BookDetailedActivity.java
  5. 5
      app/src/main/java/xyz/fycz/myreader/ui/activity/SearchBookActivity.java
  6. 4
      app/src/main/java/xyz/fycz/myreader/ui/fragment/DIYSourceFragment.java
  7. 6
      app/src/main/java/xyz/fycz/myreader/util/utils/AdUtils.java
  8. 3
      app/src/main/res/layout/dialog_textview.xml
  9. 1
      app/src/main/res/values/strings.xml
  10. 4
      app/version_code.properties

@ -44,7 +44,7 @@ def getVersionName(){
def hun = (version / 100).toInteger() def hun = (version / 100).toInteger()
def ten = (version / 10).toInteger() % 10 def ten = (version / 10).toInteger() % 10
def one = version % 10 def one = version % 10
return hun + "." + ten + "." + one return hun + "." + ten + "." + one + "-beta"
} }
def versionN = getVersionName() def versionN = getVersionName()

@ -1,6 +1,7 @@
风月读书v1.9.6 风月读书v1.9.6
更新内容: 更新内容:
1、适配英文书籍排版(建议使用等距排版) 1、适配英文书籍排版(建议使用等距排版)
2、兼容第三方书源(目前处于测试阶段,可能存在未知bug),具体说明见书源管理-DIY书源-书源说明
2021.05.09 2021.05.09
风月读书v1.9.5 风月读书v1.9.5

@ -141,6 +141,7 @@ public abstract class BaseListAdapter<T> extends RecyclerView.Adapter<RecyclerVi
public void clear(){ public void clear(){
mList.clear(); mList.clear();
notifyDataSetChanged();
} }
/***************************inner class area***********************************/ /***************************inner class area***********************************/

@ -487,7 +487,7 @@ public class BookDetailedActivity extends BaseActivity {
public void onError(Throwable e) { public void onError(Throwable e) {
binding.pbLoading.setVisibility(View.GONE); binding.pbLoading.setVisibility(View.GONE);
mCatalogAdapter.clear(); mCatalogAdapter.clear();
ToastUtils.showError("最新章节加载失败,请尝试重新加载!"); ToastUtils.showError("最新章节加载失败!");
if (App.isDebug()) e.printStackTrace(); if (App.isDebug()) e.printStackTrace();
} }
}); });

@ -170,7 +170,6 @@ public class SearchBookActivity extends BaseActivity {
protected void initWidget() { protected void initWidget() {
super.initWidget(); super.initWidget();
initSuggestionList(); initSuggestionList();
binding.etSearchKey.requestFocus();//get the focus
//enter事件 //enter事件
binding.etSearchKey.setOnEditorActionListener((textView, i, keyEvent) -> { binding.etSearchKey.setOnEditorActionListener((textView, i, keyEvent) -> {
if (i == EditorInfo.IME_ACTION_UNSPECIFIED) { if (i == EditorInfo.IME_ACTION_UNSPECIFIED) {
@ -243,6 +242,7 @@ public class SearchBookActivity extends BaseActivity {
mHandler.sendMessage(mHandler.obtainMessage(1)); mHandler.sendMessage(mHandler.obtainMessage(1));
}); });
initHistoryList(); initHistoryList();
mHandler.postDelayed(() -> binding.etSearchKey.requestFocus(), 200);
} }
@Override @Override
@ -557,8 +557,7 @@ public class SearchBookActivity extends BaseActivity {
getData(); getData();
mSearchHistoryService.addOrUpadteHistory(searchKey); mSearchHistoryService.addOrUpadteHistory(searchKey);
//收起软键盘 //收起软键盘
InputMethodManager imm = (InputMethodManager) App.getmContext().getSystemService(Context.INPUT_METHOD_SERVICE); InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
assert imm != null;
imm.hideSoftInputFromWindow(binding.etSearchKey.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS); imm.hideSoftInputFromWindow(binding.etSearchKey.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
} }
} }

@ -165,9 +165,7 @@ public class DIYSourceFragment extends BaseFragment {
}); });
binding.tvSourceTip.setOnClickListener(v -> { binding.tvSourceTip.setOnClickListener(v -> {
Intent intent = new Intent(Intent.ACTION_VIEW, MyAlertDialog.showTipDialogWithLink(getContext(), "书源说明",R.string.DIY_source_tip);
Uri.parse("https://blog.csdn.net/fengyuecanzhu/article/details/113826962"));
startActivity(intent);
}); });
binding.ivGroup.setOnClickListener(this::showSourceGroupMenu); binding.ivGroup.setOnClickListener(this::showSourceGroupMenu);

@ -123,9 +123,9 @@ public class AdUtils {
public static void initAd() { public static void initAd() {
if (!hasInitAd) { if (!hasInitAd) {
hasInitAd = true; hasInitAd = true;
DdSdkHelper.init("1234", "216", "51716a16fbdf50905704b6575b1b3b60", DdSdkHelper.init("", "", "",
"142364", "35ce0efe5f3cc960b116db227498e238", "", "",
"8167", "85bd159309c3da1b", "", "",
App.getApplication(), App.isDebug()); App.getApplication(), App.isDebug());
} }
} }

@ -7,8 +7,7 @@
android:textColor="@color/textPrimary" android:textColor="@color/textPrimary"
android:textSize="@dimen/text_normal_size" android:textSize="@dimen/text_normal_size"
android:textIsSelectable="true" android:textIsSelectable="true"
android:paddingStart="25dp" android:paddingHorizontal="25dp"
android:paddingEnd="25dp"
android:paddingTop="10dp"> android:paddingTop="10dp">
</TextView> </TextView>

@ -353,6 +353,7 @@
在“安全选项” 中找到“第三方应用管理”,并选择“添加应用”,输入名称如“风月读书”后,会生成密码, 在“安全选项” 中找到“第三方应用管理”,并选择“添加应用”,输入名称如“风月读书”后,会生成密码,
选择完成;其中<a href="https://dav.jianguoyun.com/dav/">https://dav.jianguoyun.com/dav/</a>就是填入“WebDAV 服务器地址”的内容,“使用情况”后面的邮箱地址就是你的“WebDAV 账号”,点击显示密码后得到的密码就是你的“WebDAV 密码”。) 选择完成;其中<a href="https://dav.jianguoyun.com/dav/">https://dav.jianguoyun.com/dav/</a>就是填入“WebDAV 服务器地址”的内容,“使用情况”后面的邮箱地址就是你的“WebDAV 账号”,点击显示密码后得到的密码就是你的“WebDAV 密码”。)
\n\n2、 无需操作,APP默认每天自动云备份一次。</string> \n\n2、 无需操作,APP默认每天自动云备份一次。</string>
<string name="DIY_source_tip">1、风月读书支持用户自定义书源,编写书源可参考<a href="https://blog.csdn.net/fengyuecanzhu/article/details/113826962">\"风月读书书源说明\"</a>,同时软件内置了几个参考DIY书源供参考编写.\n\n2、风月读书兼容第三方书源,提供多种导入方式.您可点击<a href="http://yck.mumuceo.com/yuedu/shuyuan/index.html">\"第三方书源仓库\"</a>,选择需要的书源,点"生成书源",复制后再应用内点网络导入.\n\n3、第三方书源目前处于测试阶段,可能存在未知bug,理性使用.</string>
<string name="source_tab_base">基本</string> <string name="source_tab_base">基本</string>
<string name="source_tab_search">搜索</string> <string name="source_tab_search">搜索</string>
<string name="source_tab_find">发现</string> <string name="source_tab_find">发现</string>

@ -1,2 +1,2 @@
#Sun May 09 12:54:40 CST 2021 #Fri May 14 22:41:02 CST 2021
VERSION_CODE=195 VERSION_CODE=196

Loading…
Cancel
Save