public TextSpinner<T> setValues(@Nullable final Collection<T> newValues) {

        this.values.clear();
        this.displayValues.clear();
        this.valuesToPosition.clear();
        if (newValues == null || newValues.isEmpty()) {
            this.values.add(null);
            this.valuesToPosition.put(null, 0);
        } else {
            this.values.addAll(newValues);
            int idx = 0;
            for (T v : values) {
                this.valuesToPosition.put(v, idx++);
            }
        }

        recalculateDisplayValues();

        //change selected item if necessary
        if (!valuesToPosition.containsKey(selectedItem)) {
            set(values.get(0));
        } else {
            //FORCE a set. This will set the new item in spinner even if it has changed its position
            set(selectedItem, true);
        }

        //values might have changed -> recreate spinner adapter
        if (this.spinner != null) {
            this.spinner.setAdapter(createSpinnerAdapter());
        }

        return this;
    }
(Re)Sets the values which are available for selection using this TextSpinner
main/src/main/java/cgeo/geocaching/ui/TextSpinner.java