From 371faf7dfb55d7b233523184dc69e88789ecdc5b Mon Sep 17 00:00:00 2001 From: IordanisKokk <72551397+IordanisKokk@users.noreply.github.com> Date: Sat, 19 Feb 2022 20:32:44 +0200 Subject: Added a Statistics Button on the Subscriptions toolbar (#5706) --- .../java/de/danoeh/antennapod/fragment/SubscriptionFragment.java | 4 ++++ app/src/main/res/menu/subscriptions.xml | 5 +++++ app/src/main/res/xml/preferences.xml | 4 ++-- core/src/main/res/drawable-xxxhdpi/chart_box_outline.xml | 7 +++++++ core/src/main/res/drawable/ic_statistics.xml | 5 ----- 5 files changed, 18 insertions(+), 7 deletions(-) create mode 100644 core/src/main/res/drawable-xxxhdpi/chart_box_outline.xml delete mode 100644 core/src/main/res/drawable/ic_statistics.xml diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/SubscriptionFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/SubscriptionFragment.java index a29fd0425..42b6580a2 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/SubscriptionFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/SubscriptionFragment.java @@ -57,6 +57,7 @@ import de.danoeh.antennapod.dialog.RemoveFeedDialog; import de.danoeh.antennapod.dialog.RenameItemDialog; import de.danoeh.antennapod.dialog.SubscriptionsFilterDialog; import de.danoeh.antennapod.fragment.actions.FeedMultiSelectActionHandler; +import de.danoeh.antennapod.fragment.preferences.StatisticsFragment; import de.danoeh.antennapod.model.feed.Feed; import de.danoeh.antennapod.view.EmptyViewHandler; import io.reactivex.Observable; @@ -229,6 +230,9 @@ public class SubscriptionFragment extends Fragment } else if (itemId == R.id.action_search) { ((MainActivity) getActivity()).loadChildFragment(SearchFragment.newInstance()); return true; + } else if (itemId == R.id.action_statistics) { + ((MainActivity) getActivity()).loadChildFragment(new StatisticsFragment()); + return true; } return false; } diff --git a/app/src/main/res/menu/subscriptions.xml b/app/src/main/res/menu/subscriptions.xml index 9276db562..fa63bf583 100644 --- a/app/src/main/res/menu/subscriptions.xml +++ b/app/src/main/res/menu/subscriptions.xml @@ -6,6 +6,11 @@ android:icon="@drawable/ic_search" custom:showAsAction="always" android:title="@string/search_label"/> + + android:title="@string/statistics_label" /> + + diff --git a/core/src/main/res/drawable/ic_statistics.xml b/core/src/main/res/drawable/ic_statistics.xml deleted file mode 100644 index 77272a527..000000000 --- a/core/src/main/res/drawable/ic_statistics.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - -- cgit v1.2.3