Add statistics moved message
This commit is contained in:
parent
50eee88484
commit
db7571ebc2
|
@ -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() {
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue