diff options
author | ByteHamster <info@bytehamster.com> | 2022-07-25 21:36:11 +0200 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2022-07-25 21:36:49 +0200 |
commit | db7571ebc25cf34c2da8446fa6d1f61397ccbc17 (patch) | |
tree | 89d278d3e4a7d17bd340668284238159671246e4 | |
parent | 50eee88484a94eabdd1978961b5c604ea3b818d8 (diff) | |
download | AntennaPod-db7571ebc25cf34c2da8446fa6d1f61397ccbc17.zip |
Add statistics moved message
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/fragment/preferences/MainPreferencesFragment.java | 11 | ||||
-rw-r--r-- | app/src/main/res/xml/preferences.xml | 6 | ||||
-rw-r--r-- | ui/i18n/src/main/res/values/strings.xml | 1 |
3 files changed, 18 insertions, 0 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/preferences/MainPreferencesFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/preferences/MainPreferencesFragment.java index e2c5036df..e53c72baf 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/preferences/MainPreferencesFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/preferences/MainPreferencesFragment.java @@ -5,6 +5,7 @@ import android.graphics.PorterDuff; import android.graphics.PorterDuffColorFilter; import android.os.Bundle; +import androidx.appcompat.app.AlertDialog; import androidx.appcompat.app.AppCompatActivity; import androidx.preference.Preference; import androidx.preference.PreferenceFragmentCompat; @@ -32,6 +33,7 @@ public class MainPreferencesFragment extends PreferenceFragmentCompat { private static final String PREF_ABOUT = "prefAbout"; private static final String PREF_NOTIFICATION = "notifications"; private static final String PREF_CONTRIBUTE = "prefContribute"; + private static final String PREF_STATISTICS = "statistics"; @Override public void onCreatePreferences(Bundle savedInstanceState, String rootKey) { @@ -121,6 +123,15 @@ public class MainPreferencesFragment extends PreferenceFragmentCompat { startActivity(new Intent(getActivity(), BugReportActivity.class)); return true; }); + findPreference(PREF_STATISTICS).setOnPreferenceClickListener( + preference -> { + new AlertDialog.Builder(getContext()) + .setMessage(R.string.statistics_moved) + .setPositiveButton(android.R.string.ok, null) + .show(); + return true; + } + ); } private void setupSearch() { diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml index 9967d7fd1..659e44f4a 100644 --- a/app/src/main/res/xml/preferences.xml +++ b/app/src/main/res/xml/preferences.xml @@ -44,6 +44,12 @@ android:title="@string/notification_pref_fragment" android:icon="@drawable/ic_notifications"/> + <Preference + android:key="statistics" + android:title="@string/statistics_label" + android:summary="@string/statistics_moved" + android:icon="@drawable/chart_box_outline"/> + <PreferenceCategory android:key="project" android:title="@string/project_pref"> diff --git a/ui/i18n/src/main/res/values/strings.xml b/ui/i18n/src/main/res/values/strings.xml index aa7fa18d4..3b6c29c31 100644 --- a/ui/i18n/src/main/res/values/strings.xml +++ b/ui/i18n/src/main/res/values/strings.xml @@ -355,6 +355,7 @@ <!-- Preferences --> <string name="storage_pref">Storage</string> <string name="storage_sum">Episode auto delete, Import, Export</string> + <string name="statistics_moved">The statistics screen was moved to the subscriptions screen. You can open it from there.</string> <string name="project_pref">Project</string> <string name="synchronization_pref">Synchronization</string> <string name="synchronization_sum">Synchronize with other devices</string> |