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;
});
}
Aggregations