Android examples for User Interface:Spinner
select Item in Spinner
import android.app.Activity; import android.widget.ArrayAdapter; import android.widget.Spinner; public class Main{ public static void selectItem(Spinner spinner, Object item) { for (int index = 0; index < spinner.getCount(); ++index) { if (spinner.getItemAtPosition(index).equals(item)) { spinner.setSelection(index); }/*from ww w. j ava 2 s . c o m*/ } } }