views:

22

answers:

1

I have the current code:

ArrayAdapter adapter = new ArrayAdapter(this,android.R.layout.simple_spinner_item, array_spinner);
        adapter.setDropDownViewResource( android.R.layout.simple_spinner_dropdown_item );
        colourSpinner.setAdapter(adapter);

How would i put a vector into my array_spinner?

Thank you.

A: 

The Vector class is considered deprecated, don't use it. Use a List instead. Then you can use the overloaded ArrayAdapter constructor:

ArrayAdapter(Context context, int resource, int textViewResourceId, List<T> objects)
BeRecursive