From 93f00b15dc0321d8101bfa88bb295907983629dd Mon Sep 17 00:00:00 2001 From: ekibun Date: Fri, 13 Mar 2020 13:25:39 +0800 Subject: [PATCH] buy me a coffee --- .../bangumi/ui/setting/SettingsActivity.kt | 14 ++++++++++++++ .../main/res/layout/pref_coffee_header.xml | 19 +++++++++++++++++++ app/src/main/res/values/strings.xml | 7 +++++++ app/src/main/res/xml/app_preferences.xml | 17 +++++++++++++++++ 4 files changed, 57 insertions(+) create mode 100644 app/src/main/res/layout/pref_coffee_header.xml diff --git a/app/src/main/java/soko/ekibun/bangumi/ui/setting/SettingsActivity.kt b/app/src/main/java/soko/ekibun/bangumi/ui/setting/SettingsActivity.kt index bda2b32..2b0a662 100644 --- a/app/src/main/java/soko/ekibun/bangumi/ui/setting/SettingsActivity.kt +++ b/app/src/main/java/soko/ekibun/bangumi/ui/setting/SettingsActivity.kt @@ -22,6 +22,7 @@ import soko.ekibun.bangumi.model.ThemeModel import soko.ekibun.bangumi.ui.view.BaseFragmentActivity import soko.ekibun.bangumi.ui.web.WebActivity import soko.ekibun.bangumi.util.AppUtil +import java.net.URLEncoder /** @@ -159,6 +160,19 @@ class SettingsActivity : BaseFragmentActivity(), PreferenceFragmentCompat.OnPref "github_page" -> activity?.let { WebActivity.launchUrl(it, "https://github.com/ekibun/Bangumi", "") } + "pref_alipay" -> activity?.let { + it.startActivity( + Intent.createChooser( + Intent.parseUri( + "intent://platformapi/startapp?saId=10000007&" + + "qrcode=" + URLEncoder.encode("https://qr.alipay.com/fkx192410t0bnuwmwawdaa4") + + "#Intent;scheme=alipayqr;package=com.eg.android.AlipayGphone;end", + Intent.URI_INTENT_SCHEME + ), + "buy me a coffee" + ) + ) + } } return super.onPreferenceTreeClick(preference) diff --git a/app/src/main/res/layout/pref_coffee_header.xml b/app/src/main/res/layout/pref_coffee_header.xml new file mode 100644 index 0000000..f2f878a --- /dev/null +++ b/app/src/main/res/layout/pref_coffee_header.xml @@ -0,0 +1,19 @@ + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 2b89b64..343295d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -293,4 +293,11 @@ 历史记录 清空历史记录 关于 + + +一转眼,app已经两岁了,是开坑之后持续最久的项目了。起初是想借助Bangumi的api整合各个资源站的数据,没想到写着写着变成了Bangumi第三方客户端。\n +\n两年来,通过这个项目认识了Bangumi,也认识了一些友商dalao,项目也成了日常摸鱼和脑洞的试验场。一路下来很有趣,所以也会坚持写下去。当然,由于垃圾原生和自己技术的问题,新功能肯定没有隔壁友商加的快。\n +\n最后,欢迎各种建议、欢迎STAR,欢迎投食!\n + + 2020-03-13 diff --git a/app/src/main/res/xml/app_preferences.xml b/app/src/main/res/xml/app_preferences.xml index 4644c9a..71eb34b 100644 --- a/app/src/main/res/xml/app_preferences.xml +++ b/app/src/main/res/xml/app_preferences.xml @@ -1,6 +1,7 @@ + + + + + + \ No newline at end of file