开发者

how to load dynamic array from vector in android? [closed]

开发者 https://www.devze.com 2022-12-18 11:46 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its cu开发者_如何学Crrent form.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its cu开发者_如何学Crrent form. For help clarifying this question so that it can be reopened, visit the help center. Closed 10 years ago.

how to load dynamic array from vector in android?


Something like this?

int count = vector.size();
String[] array = new String[count];
vector.copyInto(array); 

to add it to spinner try this

ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, array);
spinner.setAdapter(adapter);
0

精彩评论

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