public void setItems(List<Item> items) { LOGGER.v("[setItems] size:" + items.size()); this.items.clear(); for (int i = 0; i < items.size(); i++) { this.items.add(items.get(i)); } adapter.notifyDataSetChanged(); }
public void addItem(Item item) { LOGGER.v("[addItem] text:" + item.getText()); items.add(item); adapter.notifyDataSetChanged(); }