How-to articles, tricks, and solutions about SPINNER

How to set selected item of Spinner by value, not by position?

To set the selected item of a Spinner by value (not by position) in Android, you can use the setSelection() method of the Spinner class and pass it the index of the item that you want to select.