Java 类org.androidannotations.annotations.ItemSelect 实例源码

项目:CodeCamp    文件:AboutFragment.java   
@ItemSelect(R.id.spinner) public void onSpinnerItemClicked(boolean pSelected,
                                                           Conference pConference) {
    if (!mIgnoreSelection) {
        this.onBackgroundChangeConference(pConference);
    }
}
项目:lifx-tasker    文件:EditActivity.java   
@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);
    }
}
项目:settlers-remake    文件:MapSetupFragment.java   
@ItemSelect(R.id.spinner_number_of_players)
void playerSelected(boolean selected, int position) {
    presenter.playerCountSelected(playerCountsAdapter.getItem(position));
}
项目:settlers-remake    文件:MapSetupFragment.java   
@ItemSelect(R.id.spinner_start_resources)
void startResourcesSelected(boolean selected, int position) {
    presenter.startResourcesSelected(startResourcesAdapter.getItem(position));
}
项目:transdroid    文件:ListWidgetConfigActivity.java   
@ItemSelect
protected void serverSpinnerItemSelected(boolean selected, ServerSetting server) {
    serverText.setText(server.getName());
    loadTorrents();
}
项目:transdroid    文件:ListWidgetConfigActivity.java   
@ItemSelect
protected void filterSpinnerItemSelected(boolean selected, StatusTypeFilter statusTypeFilter) {
    filterText.setText(statusTypeFilter.getName());
    filterTorrents();
}
项目:transdroid    文件:ListWidgetConfigActivity.java   
@ItemSelect
protected void sortSpinnerItemSelected(boolean selected, SortByListItem sortByListItem) {
    filterTorrents();
}