public boolean changeDeleteVisible() { this.deleteVisible = !deleteVisible; if (!deleteVisible) { //// 重置多选框状态 for (DownLoadInfo downInfo : list) { if (downInfo.isDelete()) downInfo.setDelete(false); } } notifyDataSetChanged(); return deleteVisible; }
public void setDeleteAllList(Button deleteall) { // 将所有数据标记为可删除 boolean delete = getNotSelete(); // 含有未被选中的则全选 如果已经被全选则全部取消 if (delete) deleteall.setText(mContext.getString(R.string.notselectall)); else deleteall.setText(mContext.getString(R.string.selectall)); for (DownLoadInfo downInfo : list) downInfo.setDelete(delete); notifyDataSetChanged(); Message message = new Message(); message.what = DELETElAYOUT; message.obj = getSeleteCount(); handler.sendMessage(message); }