Java tutorial
//package com.java2s; import android.content.Context; import android.widget.ArrayAdapter; public class Main { public static ArrayAdapter<String> getSpinnerAdapter(Context context, String[] datas) { ArrayAdapter<String> adapter = new ArrayAdapter<String>(context, android.R.layout.simple_spinner_item, datas); adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); return adapter; } }