Add Contribute entry to settings screen under 'Project' (#5028)

This commit is contained in:
peakvalleytech 2021-04-02 09:18:33 -07:00 committed by GitHub
parent ea4488c181
commit bb51e9ebd9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 31 additions and 0 deletions

View File

@ -31,6 +31,7 @@ public class MainPreferencesFragment extends PreferenceFragmentCompat {
private static final String STATISTICS = "statistics";
private static final String PREF_ABOUT = "prefAbout";
private static final String PREF_NOTIFICATION = "notifications";
private static final String PREF_CONTRIBUTE = "prefContribute";
@Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
@ -107,6 +108,10 @@ public class MainPreferencesFragment extends PreferenceFragmentCompat {
IntentUtils.openInBrowser(getContext(), "https://forum.antennapod.org/");
return true;
});
findPreference(PREF_CONTRIBUTE).setOnPreferenceClickListener(preference -> {
IntentUtils.openInBrowser(getContext(), "https://antennapod.org/contribute/");
return true;
});
findPreference(PREF_SEND_BUG_REPORT).setOnPreferenceClickListener(preference -> {
startActivity(new Intent(getActivity(), BugReportActivity.class));
return true;

View File

@ -60,6 +60,10 @@
android:key="prefViewForum"
android:title="@string/visit_user_forum"
android:icon="?attr/ic_chat" />
<Preference
android:key="prefContribute"
android:title="@string/pref_contribute"
android:icon="?attr/ic_contribute" />
<Preference
android:key="prefSendBugReport"
android:title="@string/bug_report_title"

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FF000000"
android:pathData="M12,21.35L10.55,20.03C5.4,15.36 2,12.27 2,8.5C2,5.41 4.42,3 7.5,3C9.24,3 10.91,3.81 12,5.08C13.09,3.81 14.76,3 16.5,3C19.58,3 22,5.41 22,8.5C22,12.27 18.6,15.36 13.45,20.03L12,21.35Z"/>
</vector>

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M12,21.35L10.55,20.03C5.4,15.36 2,12.27 2,8.5C2,5.41 4.42,3 7.5,3C9.24,3 10.91,3.81 12,5.08C13.09,3.81 14.76,3 16.5,3C19.58,3 22,5.41 22,8.5C22,12.27 18.6,15.36 13.45,20.03L12,21.35Z"/>
</vector>

View File

@ -64,4 +64,5 @@
<attr name="ic_notifications" format="reference"/>
<attr name="seek_background" format="color" />
<attr name="ic_share" format="reference"/>
<attr name="ic_contribute" format="reference" />
</resources>

View File

@ -564,6 +564,7 @@
<string name="kept_updated">Kept updated</string>
<string name="not_kept_updated">Not kept updated</string>
<string name="pref_feed_settings_dialog_msg">This setting is unique to each podcast. You can change it by opening the podcast page.</string>
<string name="pref_contribute">Contribute</string>
<!-- About screen -->
<string name="about_pref">About</string>

View File

@ -80,6 +80,7 @@
<item name="filter_dialog_button_background">@drawable/filter_dialog_background_light</item>
<item name="ic_notifications">@drawable/ic_notifications_black</item>
<item name="ic_share">@drawable/ic_share_black</item>
<item name="ic_contribute">@drawable/ic_contribute_black</item>
</style>
<style name="Theme.AntennaPod.Dark" parent="Theme.Base.AntennaPod.Dark">
@ -162,6 +163,7 @@
<item name="filter_dialog_button_background">@drawable/filter_dialog_background_dark</item>
<item name="ic_notifications">@drawable/ic_notifications_white</item>
<item name="ic_share">@drawable/ic_share_white</item>
<item name="ic_contribute">@drawable/ic_contribute_white</item>
</style>
<style name="Theme.AntennaPod.TrueBlack" parent="Theme.Base.AntennaPod.TrueBlack">