Пример #1
0
 @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));
   }
 }
Пример #2
0
 public void addItem(Item item) {
   LOGGER.v("[addItem] text:" + item.getText());
   items.add(item);
   adapter.notifyDataSetChanged();
 }