Java tutorial
//package com.java2s; import android.widget.Spinner; public class Main { public static int GetIndexSpinner(Spinner spinner, Object myfind) { int index = 0; for (int i = 0; i < spinner.getCount(); i++) { if (spinner.getItemAtPosition(i).equals(myfind)) { index = i; } } return index; } }