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
2010-02-01 09:07:48
how to add this array to spinner
deepthi
2010-02-01 09:12:25
@deepthi: That's a new question.
Roman Nurik
2010-02-01 09:36:43
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
2010-02-01 10:10:52
hey thanq veru much its working.
deepthi
2010-02-02 10:23:22
you could also consider accepting the answer. thats another way of saying thank you.
zapping
2010-02-02 10:51:05
ok thank you very much
deepthi
2010-02-04 04:24:31