Skip to content

Commit 617b5d2

Browse files
committed
add update download url in setting about content
1 parent 688c45a commit 617b5d2

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

app/src/main/java/com/loopeer/codereader/ui/activity/AboutActivity.java

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ protected void onCreate(Bundle savedInstanceState) {
3535
private void setUpTextSpan() {
3636
String aboutContent = getResources().getString(R.string.about_content);
3737
int[] indexSource = CustomTextUtils.calculateTextStartEnd(aboutContent, getResources().getString(R.string.about_coreader));
38-
SpannableString signPolicyTipSpan = new SpannableString(aboutContent);
39-
signPolicyTipSpan.setSpan(new ColorClickableSpan(this, R.color.colorPrimary) {
38+
SpannableString aboutContentSpan = new SpannableString(aboutContent);
39+
aboutContentSpan.setSpan(new ColorClickableSpan(this, R.color.colorPrimary) {
4040
@Override
4141
public void onClick(View widget) {
4242
Navigator.startWebActivity(AboutActivity.this, getString(R.string.about_coreader_github_url));
@@ -45,7 +45,7 @@ public void onClick(View widget) {
4545

4646
int[] indexEmail = CustomTextUtils.calculateTextStartEnd(aboutContent,
4747
getResources().getString(R.string.about_email));
48-
signPolicyTipSpan.setSpan(new ColorClickableSpan(this, R.color.colorPrimary) {
48+
aboutContentSpan.setSpan(new ColorClickableSpan(this, R.color.colorPrimary) {
4949
@Override
5050
public void onClick(View widget) {
5151
Navigator.startComposeEmail(AboutActivity.this,
@@ -54,7 +54,15 @@ public void onClick(View widget) {
5454
getString(R.string.about_email_content_tip));
5555
}
5656
}, indexEmail[0], indexEmail[1], Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
57-
mTextAboutContent.setText(signPolicyTipSpan);
57+
int[] indexFirDownload = CustomTextUtils.calculateTextStartEnd(aboutContent,
58+
getResources().getString(R.string.about_fir_download));
59+
aboutContentSpan.setSpan(new ColorClickableSpan(this, R.color.colorPrimary) {
60+
@Override
61+
public void onClick(View widget) {
62+
Navigator.startOutWebActivity(AboutActivity.this, getString(R.string.about_fir_download_url));
63+
}
64+
}, indexFirDownload[0], indexFirDownload[1], Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
65+
mTextAboutContent.setText(aboutContentSpan);
5866
mTextAboutContent.setMovementMethod(LinkMovementMethod.getInstance());
5967
}
6068

app/src/main/res/values-zh/strings.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,10 @@
5959
<!-- about -->
6060
<string name="about_coreader">CoReader</string>
6161
<string name="about_email">[email protected]</string>
62-
<string name="about_content">CoReader in Github\n联系方式: [email protected]\n如果您有什么好的提议或者bug,欢迎添加issue或者发送邮件给我们,我们会不断完善,方便大家阅读代码</string>
62+
<string name="about_content">CoReader in Github\n联系方式: [email protected]\n如果您有什么好的提议或者bug,欢迎添加issue或者发送邮件给我们,我们会不断完善,方便大家阅读代码.最后,你可以通过Fir Download下载最新的版本</string>
6363
<string name="about_email_app_not_have">没有邮箱App,请安装后重试</string>
64+
<string name="about_fir_download">Fir Download</string>
65+
<string name="about_fir_download_url">http://fir.im/coreader</string>
6466
<string name="about_coreader_github_url">https://github.com/loopeer/code-reader</string>
6567
<string name="about_email_content_tip">来自CoReader客户端</string>
6668
</resources>

app/src/main/res/values/strings.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,10 @@
6666
<!-- about -->
6767
<string name="about_coreader">CoReader</string>
6868
<string name="about_email">[email protected]</string>
69-
<string name="about_content">CoReader in Github\nContact: [email protected]\nWe will thanks for your help to send email to us or add issue in Github.We will constantly improve the app.In order to let everyone read the code easily</string>
69+
<string name="about_content">CoReader in Github\nContact: [email protected]\nWe will thanks for your help to send email to us or add issue in Github.We will constantly improve the app.In order to let everyone read the code easily.At last you can download latest version at Fir Download</string>
7070
<string name="about_email_app_not_have">No email client configured, please setup and try again</string>
7171
<string name="about_coreader_github_url">https://github.com/loopeer/code-reader</string>
72+
<string name="about_fir_download">Fir Download</string>
73+
<string name="about_fir_download_url">http://fir.im/coreader</string>
7274
<string name="about_email_content_tip">From CoReader App</string>
7375
</resources>

0 commit comments

Comments
 (0)