diff --git a/app/src/main/java/com/hippo/nimingban/ui/SettingsActivity.java b/app/src/main/java/com/hippo/nimingban/ui/SettingsActivity.java index 8c208356..108d3f83 100644 --- a/app/src/main/java/com/hippo/nimingban/ui/SettingsActivity.java +++ b/app/src/main/java/com/hippo/nimingban/ui/SettingsActivity.java @@ -806,6 +806,7 @@ public static class InfoFragment extends PreferenceFragment private static final String KEY_VERSION = "version"; private static final String KEY_DUMP_LOGCAT = "dump_logcat"; private static final String KEY_HELP_NIMINGBAN = "help_nimingban"; + private static final String KEY_HELP = "help"; private Preference mAuthor; private Preference mSource; @@ -813,6 +814,7 @@ public static class InfoFragment extends PreferenceFragment private Preference mVersion; private Preference mDumpLogcat; private Preference mHelpNimingban; + private Preference mHelp; private boolean mShowTip = true; private final long[] mHits = new long[8]; @@ -828,6 +830,7 @@ public void onCreate(Bundle savedInstanceState) { mVersion = findPreference(KEY_VERSION); mDumpLogcat = findPreference(KEY_DUMP_LOGCAT); mHelpNimingban = findPreference(KEY_HELP_NIMINGBAN); + mHelp = findPreference(KEY_HELP); mAuthor.setOnPreferenceClickListener(this); mSource.setOnPreferenceClickListener(this); @@ -835,6 +838,7 @@ public void onCreate(Bundle savedInstanceState) { mVersion.setOnPreferenceClickListener(this); mDumpLogcat.setOnPreferenceClickListener(this); mHelpNimingban.setOnPreferenceClickListener(this); + mHelp.setOnPreferenceClickListener(this); mAuthor.setSummary("Hippo ".replaceAll("\\$", "@")); @@ -908,6 +912,8 @@ public boolean onPreferenceClick(Preference preference) { .setTitle(R.string.help_nimingban_title) .setMessage(R.string.help_nimingban_message) .show(); + } else if (KEY_HELP.equals(key)) { + OpenUrlHelper.openUrl(getActivity(), "http://nimingban.herokuapp.com/help.html", false); } return true; } diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index d42dbd3a..57e54a8c 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -235,6 +235,8 @@ ฅ<(ΦωΦ)>ฅ    喵喵~~ 帮助匿名版 了解如何帮助匿名版做得更好 + 帮助 + 如果你还不知道,直接问开发者吧 文本格式 字体大小 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 8d7ab993..7f65380f 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -243,6 +243,8 @@ ฅ<(ΦωΦ)>ฅ    nya nya~~ Help nimingban Learn how to make Nimingban better + Help + Ask the developer if you can\'t find the answer Text format Font size diff --git a/app/src/main/res/xml/info_settings.xml b/app/src/main/res/xml/info_settings.xml index 080db22a..bda48b88 100644 --- a/app/src/main/res/xml/info_settings.xml +++ b/app/src/main/res/xml/info_settings.xml @@ -45,4 +45,9 @@ android:title="@string/main_help_nimingban" android:summary="@string/main_help_nimingban_summary"/> + +