@Override public void onBindViewHolder(ItemViewHolder holder, int position) { if (items != null) { Item item = items.get(position); holder.checkBox.setChecked(item.isComplete()); holder.text.setText(item.getText()); Date date = new Date(item.getTimestamp()); holder.date.setText(dateFormat.format(date)); } }
public void addItem(Item item) { LOGGER.v("[addItem] text:" + item.getText()); items.add(item); adapter.notifyDataSetChanged(); }