summaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java26
-rw-r--r--app/src/main/res/xml/preferences.xml3
2 files changed, 20 insertions, 9 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java b/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java
index 3aa04f202..116272578 100644
--- a/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java
+++ b/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java
@@ -90,6 +90,7 @@ public class PreferenceController implements SharedPreferences.OnSharedPreferenc
public static final String PREF_EXPANDED_NOTIFICATION = "prefExpandNotify";
public static final String PREF_PROXY = "prefProxy";
public static final String PREF_KNOWN_ISSUES = "prefKnownIssues";
+ public static final String PREF_FAQ = "prefFaq";
public static final String PREF_SEND_CRASH_REPORT = "prefSendCrashReport";
private final PreferenceUI ui;
@@ -328,7 +329,7 @@ public class PreferenceController implements SharedPreferences.OnSharedPreferenc
Toast.LENGTH_SHORT);
toast.show();
return true;
- });
+ });
ui.findPreference(PreferenceController.PREF_GPODNET_LOGOUT).setOnPreferenceClickListener(
preference -> {
GpodnetPreferences.logout();
@@ -382,14 +383,11 @@ public class PreferenceController implements SharedPreferences.OnSharedPreferenc
return true;
});
ui.findPreference(PREF_KNOWN_ISSUES).setOnPreferenceClickListener(preference -> {
- String url = "https://github.com/AntennaPod/AntennaPod/labels/bug";
- try {
- Intent myIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
- ui.getActivity().startActivity(myIntent);
- } catch (ActivityNotFoundException e) {
- Toast.makeText(ui.getActivity(), R.string.pref_no_browser_found, Toast.LENGTH_LONG).show();
- Log.e(TAG, Log.getStackTraceString(e));
- }
+ openInBrowser("https://github.com/AntennaPod/AntennaPod/labels/bug");
+ return true;
+ });
+ ui.findPreference(PREF_FAQ).setOnPreferenceClickListener(preference -> {
+ openInBrowser("http://antennapod.org/faq.html");
return true;
});
ui.findPreference(PREF_SEND_CRASH_REPORT).setOnPreferenceClickListener(preference -> {
@@ -410,6 +408,16 @@ public class PreferenceController implements SharedPreferences.OnSharedPreferenc
setSelectedNetworksEnabled(UserPreferences.isEnableAutodownloadWifiFilter());
}
+ private void openInBrowser(String url) {
+ try {
+ Intent myIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
+ ui.getActivity().startActivity(myIntent);
+ } catch (ActivityNotFoundException e) {
+ Toast.makeText(ui.getActivity(), R.string.pref_no_browser_found, Toast.LENGTH_LONG).show();
+ Log.e(TAG, Log.getStackTraceString(e));
+ }
+ }
+
public void onResume() {
checkItemVisibility();
setUpdateIntervalText();
diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml
index ad497a90d..675687fb8 100644
--- a/app/src/main/res/xml/preferences.xml
+++ b/app/src/main/res/xml/preferences.xml
@@ -276,6 +276,9 @@
</PreferenceCategory>
<PreferenceCategory android:title="@string/project_pref">
<Preference
+ android:key="prefFaq"
+ android:title="@string/pref_faq"/>
+ <Preference
android:key="prefKnownIssues"
android:title="@string/pref_known_issues"/>
<Preference