更新README

pull/5/head
fengyuecanzhu 4 years ago
parent b644543092
commit 031c3ccc98
  1. 21
      app/src/main/java/xyz/fycz/myreader/application/MyApplication.java
  2. 4
      app/src/main/java/xyz/fycz/myreader/common/APPCONST.java
  3. 14
      app/src/main/java/xyz/fycz/myreader/ui/activity/AboutActivity.java
  4. 22
      app/src/main/java/xyz/fycz/myreader/ui/adapter/holder/SearchBookHolder.java
  5. 16
      app/src/main/java/xyz/fycz/myreader/ui/fragment/MineFragment.java
  6. 29
      app/src/main/res/layout/fragment_mine.xml
  7. 36
      app/src/main/res/layout/layout_about_content.xml
  8. BIN
      img/4.png

@ -432,4 +432,25 @@ public class MyApplication extends Application {
return mActivity == null || mActivity.isFinishing() || mActivity.isDestroyed();
}
/****************
*
* 发起添加群流程群号风月读书交流群(1085028304) key 8PIOnHFuH6A38hgxvD_Rp2Bu-Ke1ToBn
* 调用 joinQQGroup(8PIOnHFuH6A38hgxvD_Rp2Bu-Ke1ToBn) 即可发起手Q客户端申请加群 风月读书交流群(1085028304)
*
* @param key 由官网生成的key
* @return 返回true表示呼起手Q成功返回false表示呼起失败
******************/
public static boolean joinQQGroup(Context context, String key) {
Intent intent = new Intent();
intent.setData(Uri.parse("mqqopensdkapi://bizAgent/qm/qr?url=http%3A%2F%2Fqm.qq.com%2Fcgi-bin%2Fqm%2Fqr%3Ffrom%3Dapp%26p%3Dandroid%26jump_from%3Dwebapi%26k%3D" + key));
// 此Flag可根据具体产品需要自定义,如设置,则在加群界面按返回,返回手Q主界面,不设置,按返回会返回到呼起产品界面 //intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
try {
context.startActivity(intent);
return true;
} catch (Exception e) {
// 未安装手Q或安装的版本不支持
return false;
}
}
}

@ -10,10 +10,10 @@ import java.io.File;
public class APPCONST {
public static String publicKey = "fyds1.0";//服务端公钥
public static String publicKey = "";//服务端公钥
public static String privateKey;//app私钥
public final static String s = "11940364935628058505";
public static final String KEY = "readerByFengyue";
public static final String KEY = "";
public static final String ALARM_SCHEDULE_MSG = "alarm_schedule_msg";

@ -32,7 +32,8 @@ public class AboutActivity extends BaseActivity2 {
CardView vmUpdate;
@BindView(R.id.vw_update_log)
CardView vmUpdateLog;
@BindView(R.id.vw_qq)
CardView vmQQ;
@BindView(R.id.vw_git)
CardView vmGit;
@BindView(R.id.vw_disclaimer)
@ -73,7 +74,16 @@ public class AboutActivity extends BaseActivity2 {
SharedPreUtils.getInstance().getString("downloadLink")));
vmUpdate.setOnClickListener(v -> MyApplication.checkVersionByServer(this, true, null));
vmUpdateLog.setOnClickListener(v -> DialogCreator.createAssetTipDialog(this, "更新日志", "updatelog.fy"));
vmQQ.setOnClickListener(v -> {
if (!MyApplication.joinQQGroup(this,"8PIOnHFuH6A38hgxvD_Rp2Bu-Ke1ToBn")){
//数据
ClipData mClipData = ClipData.newPlainText("Label", "1085028304");
//把数据设置到剪切板上
assert mClipboardManager != null;
mClipboardManager.setPrimaryClip(mClipData);
ToastUtils.showError("未安装手Q或安装的版本不支持!\n已复制QQ群号,您可自行前往QQ添加!");
}
});
vmGit.setOnClickListener(v -> openIntent(Intent.ACTION_VIEW, getString(R.string.this_github_url)));
vmDisclaimer.setOnClickListener(v -> DialogCreator.createAssetTipDialog(this, "免责声明", "disclaimer.fy"));

@ -78,11 +78,8 @@ public class SearchBookHolder extends ViewHolderImpl<SearchBookBean> {
book.setImgUrl("");
}
tvBookName.setText(book.getName());
tvNewestChapter.setText(getContext().getString(R.string.newest_chapter, book.getNewestChapterTitle()));
tvAuthor.setText(book.getAuthor());
tvSource.setText(getContext().getString(R.string.source_title_num, BookSource.fromString(book.getSource()).text, bookCount));
tvDesc.setText("");
tvType.setText("");
ReadCrawler rc = ReadCrawlerUtil.getReadCrawler(book.getSource());
if (rc instanceof BookInfoCrawler){
if (tvBookName.getTag() == null || !(Boolean) tvBookName.getTag()) {
@ -110,6 +107,15 @@ public class SearchBookHolder extends ViewHolderImpl<SearchBookBean> {
}
private void initOtherInfo(Book book){
//简介
if (book.getDesc() == null) {
tvDesc.setText("");
}else {
tvDesc.setText("简介:" + book.getDesc());
}
tvType.setText(book.getType());
tvNewestChapter.setText(getContext().getString(R.string.newest_chapter, book.getNewestChapterTitle()));
tvAuthor.setText(book.getAuthor());
//图片
if (!MyApplication.isDestroy((Activity) getContext())) {
Glide.with(getContext())
@ -121,14 +127,6 @@ public class SearchBookHolder extends ViewHolderImpl<SearchBookBean> {
.apply(RequestOptions.bitmapTransform(new RoundedCorners(8)))
.into(ivBookImg);
}
//简介
if (book.getDesc() == null) {
tvDesc.setText("");
}else {
tvDesc.setText("简介:" + book.getDesc());
}
tvType.setText(book.getType());
tvNewestChapter.setText("最新章节:" + book.getNewestChapterTitle());
tvAuthor.setText(book.getAuthor());
}
}

@ -56,6 +56,8 @@ public class MineFragment extends BaseFragment {
RelativeLayout mRlThemeMode;
@BindView(R.id.tv_theme_mode_select)
TextView tvThemeModeSelect;
@BindView(R.id.mine_rl_feedback)
RelativeLayout mRlFeedback;
@BindView(R.id.mine_rl_about)
RelativeLayout mRlAbout;
@ -250,6 +252,20 @@ public class MineFragment extends BaseFragment {
startActivity(aboutIntent);
});
mRlFeedback.setOnClickListener(v -> {
DialogCreator.createCommonDialog(getContext(), "问题反馈", "请加入QQ群(1085028304)反馈问题!", true,
"加入QQ群", "取消", (dialog, which) -> {
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);
});
}
@Override

@ -230,7 +230,36 @@
android:text="其他"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/mine_rl_feedback"
android:layout_width="match_parent"
android:layout_height="60dp"
android:paddingLeft="20dp"
android:paddingRight="20dp"
android:background="@drawable/selector_common_bg">
<ImageView
android:layout_marginStart="3dp"
android:id="@+id/iv_feedback"
android:layout_alignParentStart="true"
android:layout_width="18dp"
android:layout_height="18dp"
android:layout_centerVertical="true"
app:tint="@color/textPrimary"
android:src="@drawable/ic_feedback"
/>
<TextView
android:id="@+id/tv_feedback"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginStart="18dp"
android:layout_toEndOf="@id/iv_feedback"
android:textColor="@color/textSecondary"
android:textSize="@dimen/text_normal_size"
android:text="@string/mine_feedback"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/mine_rl_about"
android:layout_width="match_parent"

@ -41,7 +41,6 @@
<androidx.cardview.widget.CardView
android:id="@+id/vm_author"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
@ -208,6 +207,41 @@
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="@+id/vw_qq"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_margin="6dp"
android:clickable="true"
android:focusable="true"
android:foreground="?attr/selectableItemBackground"
app:cardBackgroundColor="@color/background_card">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="5dp">
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="center_vertical"
android:src="@drawable/ic_qq_group"
app:tint="@color/textSecondary" />
<TextView
android:id="@+id/tv_qq"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="5dp"
android:gravity="center_vertical"
android:textColor="@color/textSecondary"
android:text="@string/join_qq_group" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="@+id/vw_git"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Loading…
Cancel
Save