title: listview is not refreshing values after deleting row with checkbox value = true
body: <p>Good day,</p>
  
  <p>I'm doing a listview, baseadapter with checkbox that is able to delete multiple selected rows.</p>
  
  <p>here is my onCreate :</p>
  
  <pre><code> ArrayList&lt;Memos&gt; list;
  
   list = new ArrayList&lt;Memos&gt;();
   list.add(new Memos(1, "s", "s"));
   list.add(new Memos(2, "x", "aaa"));
   list.add(new Memos(3, "v", "aesf"));
  
   final ListView lv = (ListView) findViewById(R.id.myList);
   lv.setAdapter(new MemoListAdapter(list, this));
  
   deletebutton
   @Override
        public void onClick(View v) {
             MemoListAdapter myAdapter = (MemoListAdapter)lv.getAdapter();  
             myAdapter.remove();
        }
  </code></pre>
  
  <p>then here is my complete baseadapter :</p>
  
  <pre><code>        public class MemoListAdapter extends BaseAdapter {
      private List&lt;Memos&gt; listComment;
      private Context context;
      private LayoutInflater inflater = null;
      private ArrayList&lt;Memos&gt; deleteMemos;
  
      public MemoListAdapter(List&lt;Memos&gt; listComment, Context context) {
          super();
          this.listComment = listComment;
          this.context = context;
          inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  
          deleteMemos = new ArrayList&lt;Memos&gt;();
      }
  
      @Override
      public int getCount() {
  
          return listComment.size();
      }
  
      @Override
      public Memos getItem(int position) {
          return listComment.get(position);
      }
  
      @Override
      public long getItemId(int arg0) {
          return 0;
      }
  
      @Override
      public int getViewTypeCount() {
  
       return getCount();
      }
  
      @Override
      public int getItemViewType(int position) {
  
       return position;
      }
  
      public class ViewHolder
      {
          TextView body;
          TextView date;
          CheckBox checkBox;
      }
  
      @Override
      public View getView(final int position, View convertView, ViewGroup parent) {   
          final ViewHolder holder;
          if (convertView == null) {
              convertView = inflater.inflate(R.layout.list_view, null);
              holder = new ViewHolder();
              holder.body = (TextView) convertView.findViewById(R.id.big_text);
              holder.date = (TextView) convertView.findViewById(R.id.small_text);
              holder.checkBox = (CheckBox) convertView.findViewById(R.id.checkbox);
              holder.body.setText(listComment.get(position).getMessageBody());
              holder.date.setText(listComment.get(position).getMessageDate());
  
              holder.checkBox.setOnClickListener(new OnClickListener() {
  
                  @Override
                  public void onClick(View v) {
                            //is chkIos checked?
                      if(listComment.get(position).isCheckbox()) {
                       holder.checkBox.setChecked(false);
                       deleteMemos.remove(listComment.get(position));
                      }
                      else {
                          // Do invisible or gone stuff here
                       holder.checkBox.setChecked(true);
                       deleteMemos.add(listComment.get(position));
                      }
  
                  }
                });
              convertView.setTag(holder);
          } else {
              holder = (ViewHolder) convertView.getTag();
          }
          return convertView;
      }
  
      public void remove() {
  
          for(Memos memo : deleteMemos) {
              listComment.remove(memo);
          }
          this.notifyDataSetChanged();
      }
      }
  </code></pre>
  
  <p>after selecting rows to delete (4 rows)</p>
  
  <p><a href="https://i.stack.imgur.com/7Vv4P.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7Vv4P.png" alt="enter image description here"></a></p>
  
  <p>the list adjusted but the contents and the check value of the checkbox is still the same.</p>
  
  <p><a href="https://i.stack.imgur.com/ICpbN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ICpbN.png" alt="enter image description here"></a></p>
  
  <p>I am wondering what part of the notifyDataSetChanged is wrong.
  Thanks in advance!</p>