From 76181899d912f1435e094389bf035cf0b5fb13ab Mon Sep 17 00:00:00 2001 From: chenxz <563859095@qq.com> Date: Tue, 1 Oct 2019 18:19:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AE=98=E6=96=B9=E7=BD=91?= =?UTF-8?q?=E7=AB=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/cxz/wanandroid/ui/setting/SettingFragment.kt | 5 +++++ app/src/main/res/values-en/strings.xml | 2 ++ app/src/main/res/values/strings.xml | 2 ++ app/src/main/res/xml/pref_setting.xml | 6 ++++++ 4 files changed, 15 insertions(+) diff --git a/app/src/main/java/com/cxz/wanandroid/ui/setting/SettingFragment.kt b/app/src/main/java/com/cxz/wanandroid/ui/setting/SettingFragment.kt index 909fb51..349ca51 100644 --- a/app/src/main/java/com/cxz/wanandroid/ui/setting/SettingFragment.kt +++ b/app/src/main/java/com/cxz/wanandroid/ui/setting/SettingFragment.kt @@ -93,6 +93,11 @@ class SettingFragment : PreferenceFragment(), SharedPreferences.OnSharedPreferen false } + findPreference("official_website").setOnPreferenceClickListener { + context?.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.official_website_url)))) + false + } + findPreference("changelog").setOnPreferenceClickListener { context?.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.changelog_url)))) false diff --git a/app/src/main/res/values-en/strings.xml b/app/src/main/res/values-en/strings.xml index b20df73..96e4ee3 100644 --- a/app/src/main/res/values-en/strings.xml +++ b/app/src/main/res/values-en/strings.xml @@ -99,6 +99,8 @@ Only for personal and non commercial purposes Version Current Version  + Official Website + https://www.wanandroid.com Setting diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 2870502..189a2f7 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -99,6 +99,8 @@ 仅作个人及非商业用途 版本 当前版本  + 官方网站 + https://www.wanandroid.com 设置 diff --git a/app/src/main/res/xml/pref_setting.xml b/app/src/main/res/xml/pref_setting.xml index 17e3843..14dbc37 100644 --- a/app/src/main/res/xml/pref_setting.xml +++ b/app/src/main/res/xml/pref_setting.xml @@ -76,6 +76,12 @@ android:layout="@layout/custom_preference_layout" android:title="@string/version" /> + +