@Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { NotificationPreset preset = NotificationPresets.PRESETS[position]; mBackgroundPickers.generatePickers(preset.countBackgroundPickersRequired()); updateTextEditors(preset); updateNotifications(false /* cancelExisting */); }