title: how to update list after deleting an item?
body: <p>I want to delete an item from arrayList and update it after delete. The query is performing delete operation but the list is not getting updated.
  Below is the onItemLongClickListener code.</p>
  
  <pre><code>listView.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
          @Override
          public boolean onItemLongClick(AdapterView&lt;?&gt; parent, View view, int position, long id) {
  
              help.deleteEntry(position);
              adapter.remove(adapter.getItem(position));
              adapter.notifyDataSetChanged();
  
              Toast.makeText(Search.this, "Delete..", Toast.LENGTH_SHORT).show();
              return true;
          }
      });
  </code></pre>
  
  <p>Delete code of DatabaseHelper.</p>
  
  <pre><code> public void deleteEntry(long id) {
  
      // delete row in user table based on id
  
      SQLiteDatabase db = this.getReadableDatabase();
      db.delete(TABLE_NAME,KEY_ID + " = " + id,null);
  
  }
  </code></pre>