开发者

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)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜