title: Android listview delete data but listview not update
body: <p>I delete data in SQLi but listview not update. I have to open activity agian then listview will update.</p>
  
  <p>This is function delete data.</p>
  
  <pre><code>private void delData(int position) {
  
  
      cursor.moveToPosition(position);
      String rowId = cursor.getString(0);
      db.delete(DBHelper.TABLE_NAME, "_id = ?", new String[]{rowId});
  
      cursor.requery();
      adapter.notifyDataSetChanged();
  
  }
  </code></pre>
  
  <p>This is function OnItemClick in OnCreate.</p>
  
  <pre><code>protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_driver);
  
      dbHelper = new DBHelper(DriverActivity.this);
  
      lv_driver=(ListView)findViewById(R.id.lv_driver);
      lv_driver.setOnItemClickListener(new AdapterView.OnItemClickListener() {
          @Override
          public void onItemClick(AdapterView&lt;?&gt; adapterView, View view, int i, long l) {
  
              delData(i);
  
          }
      });
  }
  </code></pre>
  
  <p>How to update listview after delete data ?</p>