Search in sources :

Example 1 with FeedRefreshIntervalDialog

use of de.danoeh.antennapod.dialog.FeedRefreshIntervalDialog in project AntennaPod by AntennaPod.

the class NetworkPreferencesFragment method setupNetworkScreen.

private void setupNetworkScreen() {
    findPreference(PREF_SCREEN_AUTODL).setOnPreferenceClickListener(preference -> {
        ((PreferenceActivity) getActivity()).openScreen(R.xml.preferences_autodownload);
        return true;
    });
    findPreference(UserPreferences.PREF_UPDATE_INTERVAL).setOnPreferenceClickListener(preference -> {
        new FeedRefreshIntervalDialog(getContext()).show();
        return true;
    });
    findPreference(UserPreferences.PREF_PARALLEL_DOWNLOADS).setOnPreferenceChangeListener((preference, o) -> {
        if (o instanceof Integer) {
            setParallelDownloadsText((Integer) o);
        }
        return true;
    });
    // validate and set correct value: number of downloads between 1 and 50 (inclusive)
    findPreference(PREF_PROXY).setOnPreferenceClickListener(preference -> {
        ProxyDialog dialog = new ProxyDialog(getActivity());
        dialog.show();
        return true;
    });
}
Also used : ProxyDialog(de.danoeh.antennapod.dialog.ProxyDialog) FeedRefreshIntervalDialog(de.danoeh.antennapod.dialog.FeedRefreshIntervalDialog) PreferenceActivity(de.danoeh.antennapod.activity.PreferenceActivity)

Aggregations

PreferenceActivity (de.danoeh.antennapod.activity.PreferenceActivity)1 FeedRefreshIntervalDialog (de.danoeh.antennapod.dialog.FeedRefreshIntervalDialog)1 ProxyDialog (de.danoeh.antennapod.dialog.ProxyDialog)1