How do i put a vector into my arrayadapter?
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?
Tha开发者_高级运维nk you.
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)
精彩评论