i write a own ArrayAdapter like this one:
public class PoiListAdapter extends ArrayAdapter implements Filterable {
private Context context;
The for-each loop use an Iterator internally, and you can not add nothing to your collection while you are iterating (that's why of the exception). Try creating a new instance of the ArrayList and interate upon it
@SuppressWarnings("unchecked")
@Override
protected void publishResults(CharSequence constraint, FilterResults results) {
ArrayList fitems = new ArrayList((ArrayList) results.values);
poiListAdapter.clear();
for (Poi p : fitems) {
poiListAdapter.addValuesPoi(p);
poiListAdapter.notifyDataSetChanged();
}
}
the for-each is something like:
for(Iterator i = fitms.iterator(); i.hasNext(); ) {
Poi item = i.next();
}
Problem 2:
The List is empty at start probably because the dataset you submit is empty