Update data in Arrayadapter
This is how I update the Adapter with new data:
if (arrayAdapter == null) {
arrayAdapter = new CustomArrayAdapter(getActivity(), data);
listview.setAdapter(userAutoCompleteAdapter);
} else {
arrayAdapter.clear();
arrayAdapter.addAll(newData);
arrayAdapter.notifyDataSetChanged();
}
Assuming the getNewData() function returns ArrayList<CustomItem>
, can you change the line:
items=getNewData();
to
items.addAll(getNewData());
and see if that works?