Android examples for User Interface:Spinner
create Simple Spinner Array Adapter
import android.app.Activity; import android.widget.ArrayAdapter; import android.widget.Spinner; public class Main{ public static <ValueType> ArrayAdapter<ValueType> createSimpleSpinnerArrayAdapter( Activity activity, ValueType[] values) { ArrayAdapter<ValueType> adapter = new ArrayAdapter<>(activity, android.R.layout.simple_spinner_item, values); adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); return adapter; }//from www. j av a2s . com }