 <p>By clicking the delete button you need to call <code>delete(position);</code> and write your code like this.</p> <pre><code>public void delete(int position) { AlertDialog dialog = new AlertDialog.Builder(this) // .setIcon(R.drawable.mainicon) .setTitle("") .setMessage("Are You Sure You Want to Delete " + "?") .setPositiveButton("Yes", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { try { mDatabase.open(); mDatabase.delSecRec(ItemsList.get(position) .getItemID()); mDatabase.close(); refreshList(); } catch (Exception e) { } } }) .setNegativeButton("No", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); } }).show(); } </code></pre> <p>To refresh your adapter you need to call this method.</p> <pre><code>private void refreshList() { db.open(); ItemsList = db.getAllItems(); db.close(); if (ItemsList != null) { setAdapterList(); } else { ShowMessage.show(ViewMyThings.this, "No Record found yet !!!"); } mListView.setAdapter(mAdapter); } </code></pre> <p>Hope you will get idea from this code.</p>