How to create spinner with drop down list like here:
|------------|
| option1 |
|------------|
| option2 |
|------------|
| option3 |
|------------|
| create new |
|------------|
On clicking from 'option1' to 'option3' - just clicked item is set as a spinner value.
But when we click 'create new' then:
- drop down list is closed
- nothing is selected [spinner retain primal value]
- some 'external action is called' [which I inject outside of spinner]
UPDATE
Solution like below Juanjo's https://stackoverflow.com/a/28612543/1367449
generally do the job but has a drawback: between user's click on | create new |
and setting spinner.setSelection(previousSelection)
the spinner shows 'create new' value, and only then switches to "previous selection". Although this swich lasts for a fraction of a second then it cause a 'spinner blink effect' which hope we can eliminate.