新增建议反馈

pull/5/head
fengyuecanzhu 4 years ago
parent 42cc3f6d3f
commit 1776d017fe
  1. BIN
      .idea/caches/build_file_checksums.ser
  2. 25
      app/build.gradle
  3. 2
      app/src/main/AndroidManifest.xml
  4. 4
      app/src/main/assets/updatelog.fy
  5. 90
      app/src/main/java/xyz/fycz/myreader/ui/activity/FeedbackActivity.java
  6. 4
      app/src/main/java/xyz/fycz/myreader/ui/activity/MainActivity.java
  7. 15
      app/src/main/java/xyz/fycz/myreader/ui/fragment/MineFragment.java
  8. 1
      app/src/main/res/layout/actiity_bookstore.xml
  9. 20
      app/src/main/res/layout/activity_feedback.xml
  10. BIN
      app/src/main/res/mipmap-xhdpi/ic_avatar_fycz.jpg
  11. 6
      app/src/main/res/values/strings.xml
  12. 2
      app/version_code.properties

@ -24,9 +24,32 @@ def getVersionCode() {
throw new FileNotFoundException("无法读取version_code.properties文件!") throw new FileNotFoundException("无法读取version_code.properties文件!")
} }
} }
def getVersionCodeNotIncrease() {
def versionCodeFile = file('version_code.properties')
if (versionCodeFile.canRead()) {
Properties properties = new Properties()
properties.load(new FileInputStream(versionCodeFile))
def versionCode = properties['VERSION_CODE'].toInteger()//version_code.properties文件存放的版本号
return versionCode
} else {
throw new FileNotFoundException("无法读取version_code.properties文件!")
}
}
def name = "风月读书" def name = "风月读书"
def version = getVersionCode() def version = getVersionCode()
def getVersionName(){
def version = getVersionCodeNotIncrease()
def hun = (version / 100).toInteger()
def ten = (version / 10).toInteger() % 10
def one = version % 10
return hun + "." + ten + "." + one
}
def versionN = getVersionName()
android { android {
compileSdkVersion 29 compileSdkVersion 29
buildToolsVersion '29.0.3' buildToolsVersion '29.0.3'
@ -35,7 +58,7 @@ android {
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 29 targetSdkVersion 29
versionCode version versionCode version
versionName '1.' + releaseTime() versionName versionN
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
javaCompileOptions { javaCompileOptions {
annotationProcessorOptions { annotationProcessorOptions {

@ -98,6 +98,8 @@
<activity android:name=".ui.activity.FileSystemActivity"/> <activity android:name=".ui.activity.FileSystemActivity"/>
<activity android:name=".ui.activity.FeedbackActivity"/>
<activity android:name=".ui.activity.MoreSettingActivity"/> <activity android:name=".ui.activity.MoreSettingActivity"/>
<activity android:name=".ui.activity.BookstoreActivity"/> <activity android:name=".ui.activity.BookstoreActivity"/>
<activity android:name=".ui.activity.WebDavSettingActivity"/> <activity android:name=".ui.activity.WebDavSettingActivity"/>

@ -1,3 +1,7 @@
2020.12.24
风月读书v1.7.7
1、新增建议反馈
2020.12.12 2020.12.12
风月读书v1.20.121218 风月读书v1.20.121218
1、极大地优化本地书籍章节拆分速度 1、极大地优化本地书籍章节拆分速度

@ -0,0 +1,90 @@
package xyz.fycz.myreader.ui.activity;
import android.annotation.SuppressLint;
import android.app.Dialog;
import android.webkit.WebChromeClient;
import android.webkit.WebResourceError;
import android.webkit.WebResourceRequest;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import androidx.appcompat.widget.Toolbar;
import butterknife.BindView;
import xyz.fycz.myreader.R;
import xyz.fycz.myreader.base.BaseActivity;
import xyz.fycz.myreader.ui.dialog.DialogCreator;
import xyz.fycz.myreader.widget.RefreshLayout;
/**
* @author fengyue
* @date 2020/12/24 20:48
*/
public class FeedbackActivity extends BaseActivity {
@BindView(R.id.refresh_layout)
RefreshLayout mRlRefresh;
@BindView(R.id.wv_feedback)
WebView wvFeedback;
@Override
protected int getContentId() {
return R.layout.activity_feedback;
}
@Override
protected void setUpToolbar(Toolbar toolbar) {
super.setUpToolbar(toolbar);
setStatusBarColor(R.color.colorPrimary, true);
getSupportActionBar().setTitle("建议反馈");
}
@SuppressLint("SetJavaScriptEnabled")
@Override
protected void initWidget() {
super.initWidget();
//声明WebSettings子类
WebSettings webSettings = wvFeedback.getSettings();
//如果访问的页面中要与Javascript交互,则webview必须设置支持Javascript
webSettings.setJavaScriptEnabled(true);
wvFeedback.loadUrl("https://www.wjx.cn/jq/102348283.aspx");
wvFeedback.setWebViewClient(new WebViewClient(){
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
if (!url.endsWith("102348283.aspx")){
System.out.println(url);
if (url.contains("complete")){
DialogCreator.createCommonDialog(FeedbackActivity.this, "意见反馈",
"提交成功,感谢您的建议反馈!", false, "知道了",
(dialog, which) -> finish());
}
return true;
}
view.loadUrl(url);
return true;
}
@Override
public void onReceivedError(WebView view, WebResourceRequest request, WebResourceError error) {
super.onReceivedError(view, request, error);
mRlRefresh.showError();
}
});
wvFeedback.setWebChromeClient(new WebChromeClient(){
@Override
public void onProgressChanged(WebView view, int newProgress) {
if (newProgress == 100){
mRlRefresh.showFinish();
}
}});
}
@Override
protected void initClick() {
super.initClick();
mRlRefresh.setOnReloadingListener(() -> {
wvFeedback.loadUrl("https://www.wjx.cn/jq/102348283.aspx");
});
}
}

@ -182,10 +182,10 @@ public class MainActivity extends BaseActivity {
} }
try { try {
int sourceVersion = SysManager.getSetting().getSourceVersion(); int sourceVersion = SysManager.getSetting().getSourceVersion();
//if (sourceVersion < APPCONST.SOURCE_VERSION) { if (sourceVersion < APPCONST.SOURCE_VERSION) {
SysManager.resetSource(); SysManager.resetSource();
Log.d(TAG, "resetSource"); Log.d(TAG, "resetSource");
//} }
} catch (Exception e) { } catch (Exception e) {
ToastUtils.showError(e.getLocalizedMessage()); ToastUtils.showError(e.getLocalizedMessage());
e.printStackTrace(); e.printStackTrace();

@ -19,6 +19,7 @@ import xyz.fycz.myreader.base.BaseFragment;
import xyz.fycz.myreader.common.APPCONST; import xyz.fycz.myreader.common.APPCONST;
import xyz.fycz.myreader.model.storage.Backup; import xyz.fycz.myreader.model.storage.Backup;
import xyz.fycz.myreader.model.storage.Restore; import xyz.fycz.myreader.model.storage.Restore;
import xyz.fycz.myreader.ui.activity.FeedbackActivity;
import xyz.fycz.myreader.ui.dialog.DialogCreator; import xyz.fycz.myreader.ui.dialog.DialogCreator;
import xyz.fycz.myreader.ui.dialog.MyAlertDialog; import xyz.fycz.myreader.ui.dialog.MyAlertDialog;
import xyz.fycz.myreader.entity.Setting; import xyz.fycz.myreader.entity.Setting;
@ -253,18 +254,8 @@ public class MineFragment extends BaseFragment {
}); });
mRlFeedback.setOnClickListener(v -> { mRlFeedback.setOnClickListener(v -> {
DialogCreator.createCommonDialog(getContext(), "问题反馈", "请加入QQ群(1085028304)反馈问题!", true, Intent intent = new Intent(getContext(), FeedbackActivity.class);
"加入QQ群", "取消", (dialog, which) -> { getActivity().startActivity(intent);
if (!MyApplication.joinQQGroup(getContext(), "8PIOnHFuH6A38hgxvD_Rp2Bu-Ke1ToBn")) {
ClipboardManager mClipboardManager = (ClipboardManager) getActivity().getSystemService(Context.CLIPBOARD_SERVICE);
//数据
ClipData mClipData = ClipData.newPlainText("Label", "1085028304");
//把数据设置到剪切板上
assert mClipboardManager != null;
mClipboardManager.setPrimaryClip(mClipData);
ToastUtils.showError("未安装手Q或安装的版本不支持!\n已复制QQ群号,您可自行前往QQ添加!");
}
}, null);
}); });
} }

@ -49,6 +49,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:srlTextLoading="@string/loading_tip" app:srlTextLoading="@string/loading_tip"
app:srlTextFailed="@string/loading_tip" app:srlTextFailed="@string/loading_tip"
app:srlTextNothing="总得有个结尾吧"
app:srlAccentColor="@color/textSecondary"/> app:srlAccentColor="@color/textSecondary"/>
</com.scwang.smartrefresh.layout.SmartRefreshLayout> </com.scwang.smartrefresh.layout.SmartRefreshLayout>

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/toolbar" />
<xyz.fycz.myreader.widget.RefreshLayout
android:id="@+id/refresh_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<WebView
android:id="@+id/wv_feedback"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</xyz.fycz.myreader.widget.RefreshLayout>
</LinearLayout>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 72 KiB

@ -147,7 +147,7 @@
<string name="common_search">搜索</string> <string name="common_search">搜索</string>
<string name="theme_mode">主题模式</string> <string name="theme_mode">主题模式</string>
<string name="join_qq_group">加入QQ群</string> <string name="join_qq_group">加入QQ群</string>
<string name="mine_feedback">问题反馈</string> <string name="mine_feedback">建议反馈</string>
<string name="menu_change_group">分组切换</string> <string name="menu_change_group">分组切换</string>
<string name="menu_group_man">分组管理</string> <string name="menu_group_man">分组管理</string>
<string name="menu_group_setting">设置分组</string> <string name="menu_group_setting">设置分组</string>
@ -214,8 +214,8 @@
<string name="read_cangshu99">99藏书·实体</string> <string name="read_cangshu99">99藏书·实体</string>
<string name="read_ben100">100本·实体</string> <string name="read_ben100">100本·实体</string>
<string name="find_qidian">起点中文网</string> <string name="find_qidian">男生小说</string>
<string name="find_qidian_ns">起点女生网</string> <string name="find_qidian_ns">女生小说</string>
<!-- 朗读 --> <!-- 朗读 -->
<string name="read_aloud">朗读</string> <string name="read_aloud">朗读</string>

@ -1,2 +1,2 @@
#Sat Dec 12 18:48:03 CST 2020 #Thu Dec 24 22:07:42 CST 2020
VERSION_CODE=177 VERSION_CODE=177

Loading…
Cancel
Save