A
A
Andrey Unger2015-01-15 10:37:25
Android
Andrey Unger, 2015-01-15 10:37:25

How to set default value for Spinner?

There is a Spinner spin element. The setOnItemSelectedListener handler is hung on it - according to which, when the value changes, some action is performed.
When the activity is initialized, the system determines the current spin value and must set it. Tried different methods and spin.setPromptId(m.intValue()); and spin.setSelection(m.intValue()); but with them, the setOnItemSelectedListener handler is triggered!
How to make it so that it does not work during initialization?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question