public void testExceptionDuringItemUpdate() throws Exception {
   final Holder holder = retrieveOnlyInstance(Holder.class);
   final Item item = retrieveOnlyInstance(Item.class);
   holder.item = item;
   withException(
       new Block4() {
         @Override
         public void run() {
           db().store(holder, Integer.MAX_VALUE);
         }
       });
   checkConsistencyFull();
 }
コード例 #2
0
  void bindView(int position, Holder holder) {

    AppCellItem item = data.get(position);
    if (holder.item == item) {
      return;
    }
    holder.img.setImageDrawable(item.getItemIcon());
    holder.title.setText(item.getFileShortName());
    holder.subtitle.setText(item.getAppSize());
    holder.item = item;
    if (PriShareSendActivity.isMultiSelectMode()) {
      // tangtaotao@ND_20140220 checkbox comment out
      // holder.chkBox.setVisibility(View.VISIBLE);
      holder.chkBox.setChecked(item.isSelected());
    } else {
      holder.chkBox.setChecked(false);
      // tangtaotao@ND_20140220 checkbox comment out
      // holder.chkBox.setVisibility(View.GONE);
    }
  }