Code example for Spinner

Methods: getSelectedItem

        return new Result(true, getSelectedSpinnerText(foundView));
    private String getSelectedSpinnerText(final Spinner foundView) {
        Object selectedItem = foundView.getSelectedItem();
        return (null != selectedItem) ? selectedItem.toString() : "";
    private Result notFoundResult(final String idArgument) {
        return Result.failedResult(String.format("Could not find %s with id %s.", Spinner.class.getName(), idArgument));
    public String key() {
        return "get_selected_spinner_item_text"; 
Stop searching for code, let great code find you!  Add Codota to your java IDE