Skip to content
This repository has been archived by the owner on Feb 25, 2022. It is now read-only.

Commit

Permalink
Add help
Browse files Browse the repository at this point in the history
  • Loading branch information
seven332 committed Oct 22, 2015
1 parent e3c458a commit f8a7f3f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -806,13 +806,15 @@ 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;
private Preference mNotice;
private Preference mVersion;
private Preference mDumpLogcat;
private Preference mHelpNimingban;
private Preference mHelp;

private boolean mShowTip = true;
private final long[] mHits = new long[8];
Expand All @@ -828,13 +830,15 @@ 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);
mNotice.setOnPreferenceClickListener(this);
mVersion.setOnPreferenceClickListener(this);
mDumpLogcat.setOnPreferenceClickListener(this);
mHelpNimingban.setOnPreferenceClickListener(this);
mHelp.setOnPreferenceClickListener(this);

mAuthor.setSummary("Hippo <hipposeven332$gmail.com>".replaceAll("\\$", "@"));

Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@
<string name="main_dump_logcat_summary">ฅ&lt;(ΦωΦ)&gt;&#160;&#160;&#160;&#160;喵喵~~</string>
<string name="main_help_nimingban">帮助匿名版</string>
<string name="main_help_nimingban_summary">了解如何帮助匿名版做得更好</string>
<string name="main_help">帮助</string>
<string name="main_help_summary">如果你还不知道,直接问开发者吧</string>

<string name="text_format">文本格式</string>
<string name="font_size">字体大小</string>
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@
<string name="main_dump_logcat_summary">ฅ&lt;(ΦωΦ)&gt;&#160;&#160;&#160;&#160;nya nya~~</string>
<string name="main_help_nimingban">Help nimingban</string>
<string name="main_help_nimingban_summary">Learn how to make Nimingban better</string>
<string name="main_help">Help</string>
<string name="main_help_summary">Ask the developer if you can\'t find the answer</string>

<string name="text_format">Text format</string>
<string name="font_size">Font size</string>
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/res/xml/info_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,9 @@
android:title="@string/main_help_nimingban"
android:summary="@string/main_help_nimingban_summary"/>

<Preference
android:key="help"
android:title="@string/main_help"
android:summary="@string/main_help_summary"/>

</PreferenceScreen>

0 comments on commit f8a7f3f

Please sign in to comment.