@ItemSelect(R.id.spinner) public void onSpinnerItemClicked(boolean pSelected, Conference pConference) { if (!mIgnoreSelection) { this.onBackgroundChangeConference(pConference); } }
@ItemSelect(R.id.edit_action_spinner) protected void actionSelected(boolean selected, String item) { log.info("actionSelected({}, {})", selected, item); if (!selected) { parameters = null; return; } Action a = Action.getAction(this, item); if (a == null) { log.error("Unknown action: " + item); showToast("Unknown action: " + item); return; } currentAction = a; parameters.putString(FireReceiver.KEY_ACTION, a.getId()); paramContainer.removeAllViews(); for (final Parameter p : a.getParameters()) { log.info("Creating editor for " + p.name()); TextView label = new TextView(this); label.setText(p.getResourceId()); paramContainer.addView(label); Button button = new Button(this); button.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { showEditor(p); } }); button.setText(R.string.edit_button); paramContainer.addView(button); TextView statusLabel = new TextView(this); if (p.validate(this, parameters)) { statusLabel.setText(p.describe(this, parameters)); } paramContainer.addView(statusLabel); labelMap.put(p, statusLabel); } }
@ItemSelect(R.id.spinner_number_of_players) void playerSelected(boolean selected, int position) { presenter.playerCountSelected(playerCountsAdapter.getItem(position)); }
@ItemSelect(R.id.spinner_start_resources) void startResourcesSelected(boolean selected, int position) { presenter.startResourcesSelected(startResourcesAdapter.getItem(position)); }
@ItemSelect protected void serverSpinnerItemSelected(boolean selected, ServerSetting server) { serverText.setText(server.getName()); loadTorrents(); }
@ItemSelect protected void filterSpinnerItemSelected(boolean selected, StatusTypeFilter statusTypeFilter) { filterText.setText(statusTypeFilter.getName()); filterTorrents(); }
@ItemSelect protected void sortSpinnerItemSelected(boolean selected, SortByListItem sortByListItem) { filterTorrents(); }