Java tutorial
//package com.java2s; import android.view.View; import android.widget.ArrayAdapter; import android.widget.Spinner; import java.util.List; public class Main { public static void SetSpinnerData(int redID, List<String> list, View view) { Spinner spinner = (Spinner) view.findViewById(redID); ArrayAdapter<String> adapter = new ArrayAdapter<String>(view.getContext(), android.R.layout.simple_spinner_item, list); spinner.setAdapter(adapter); adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); } }