tags:

views:

362

answers:

1

how to load dynamic array from vector in android?

+1  A: 

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);
zapping
how to add this array to spinner
deepthi
@deepthi: That's a new question.
Roman Nurik
This should do it.ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, array); spinner.setAdapter(adapter);Upvoted Roman's comment. Should be another question :)
zapping
hey thanq veru much its working.
deepthi
you could also consider accepting the answer. thats another way of saying thank you.
zapping
ok thank you very much
deepthi