I have a PullToRefreshListView that i'm switching ArrayAdapters for depending on what options the user selects. I'm able to get the data to show but for some reason, not able to force a redraw on the PullToRefreshListView. So when the list shortens, you can still see the white from when the PullToRefreshListView had more data in it, and therefore was longer.
My code is below:
if (adapter == null) {
adapter = new CustomAdapter(this.getActivity(), array);
} else {
adapter.clear();
adapter.addAll(array);
}
list.setAdapter(adapter);
Is there anything else that I can do to refresh the list? I tried searching several other questions on SO including:
Android - I can't refresh / redraw a ListView
However, it didn't help for my solution.