I\'m trying to copy a List \'usrs\' which is created in an Inner class to a different list \'team_memebers\'. After copying I try to iterate \'team_memebers\' in the FOR loo
Your problem is that you aren't iterating after copying list.
query.findInBackground()
is an async callback and therefore, isn't executed immediately. Because your iteration loop is PLACED below that callback, doesn't mean it will be executed after callback executes. Just put your loop inside callback like this:
query.findInBackground(new FindCallback<ParseObject>() {
public void done(List<ParseObject> usrs, ParseException e) {
if (e == null) {
team_memebers = new ArrayList<String>(usrs.size());
for (ParseObject prso:usrs) {
team_memebers.add(new String(prso.getString("Username")));
}
for (String str:team_memebers)
{
empolyeeSpinnerAdapter.add(str);
}
} else {//handle the error
}
}
});