Java tutorial
//package com.java2s; import android.widget.Spinner; public class Main { static int indexOf(Spinner _Spinner, String _String) { for (int i = 0; i < _Spinner.getCount(); ++i) { if (_Spinner.getItemAtPosition(i).toString().equalsIgnoreCase(_String)) return i; } return -1; } }