Android examples for User Interface:Spinner
Get Spinner Adapter
//package com.java2s; import android.content.Context; import android.widget.ArrayAdapter; public class Main { public static ArrayAdapter<String> getSpinnerAdapter(Context context, String[] datas) {/*from ww w. j a va 2s . c o m*/ 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; } }