Add statistics moved message

This commit is contained in:
ByteHamster 2022-07-25 21:36:11 +02:00
parent 50eee88484
commit db7571ebc2
3 changed files with 18 additions and 0 deletions

View File

@ -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() {

View File

@ -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">

View File

@ -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>