summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIordanisKokk <72551397+IordanisKokk@users.noreply.github.com>2022-02-19 20:32:44 +0200
committerGitHub <noreply@github.com>2022-02-19 19:32:44 +0100
commit371faf7dfb55d7b233523184dc69e88789ecdc5b (patch)
tree354eeaf9e98540bc12ba78145c4bf4ecfd7902fc
parent22dd0026529b27369093532f55ffe65588c35824 (diff)
downloadantennapod-371faf7dfb55d7b233523184dc69e88789ecdc5b.zip
Added a Statistics Button on the Subscriptions toolbar (#5706)
-rw-r--r--app/src/main/java/de/danoeh/antennapod/fragment/SubscriptionFragment.java4
-rw-r--r--app/src/main/res/menu/subscriptions.xml5
-rw-r--r--app/src/main/res/xml/preferences.xml4
-rw-r--r--core/src/main/res/drawable-xxxhdpi/chart_box_outline.xml7
-rw-r--r--core/src/main/res/drawable/ic_statistics.xml5
5 files changed, 18 insertions, 7 deletions
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
@@ -7,6 +7,11 @@
custom:showAsAction="always"
android:title="@string/search_label"/>
<item
+ android:id="@+id/action_statistics"
+ android:icon="@drawable/chart_box_outline"
+ android:title="@string/statistics_label"
+ custom:showAsAction="always" />
+ <item
android:id="@+id/refresh_item"
android:title="@string/refresh_label"
android:menuCategory="container"
diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml
index 7c5012899..91ba649d2 100644
--- a/app/src/main/res/xml/preferences.xml
+++ b/app/src/main/res/xml/preferences.xml
@@ -45,9 +45,9 @@
android:icon="@drawable/ic_notifications"/>
<Preference
+ android:icon="@drawable/chart_box_outline"
android:key="statistics"
- android:title="@string/statistics_label"
- android:icon="@drawable/ic_statistics" />
+ android:title="@string/statistics_label" />
<PreferenceCategory
android:key="project"
diff --git a/core/src/main/res/drawable-xxxhdpi/chart_box_outline.xml b/core/src/main/res/drawable-xxxhdpi/chart_box_outline.xml
new file mode 100644
index 000000000..c6a9bf35d
--- /dev/null
+++ b/core/src/main/res/drawable-xxxhdpi/chart_box_outline.xml
@@ -0,0 +1,7 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="24dp"
+ android:width="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path android:fillColor="?attr/action_icon_color" android:pathData="M9 17H7V10H9V17M13 17H11V7H13V17M17 17H15V13H17V17M19 19H5V5H19V19.1M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3Z" />
+</vector>
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 @@
-<vector android:height="24dp"
- android:viewportHeight="24.0" android:viewportWidth="24.0"
- android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
- <path android:fillColor="?attr/action_icon_color" android:pathData="M13,2.05V5.08C16.39,5.57 19,8.47 19,12C19,12.9 18.82,13.75 18.5,14.54L21.12,16.07C21.68,14.83 22,13.45 22,12C22,6.82 18.05,2.55 13,2.05M12,19A7,7 0 0,1 5,12C5,8.47 7.61,5.57 11,5.08V2.05C5.94,2.55 2,6.81 2,12A10,10 0 0,0 12,22C15.3,22 18.23,20.39 20.05,17.91L17.45,16.38C16.17,18 14.21,19 12,19Z"/>
-</vector>