title: I delete an entry in SQLite database, then I got mixed order in ListView?
body: <p>Hi I am making an app where I execute in the MainActivity a line of code like</p>
  
  <pre><code>ArrayList&lt;Notes&gt; array_list = mydb.getAllNotes();
  </code></pre>
  
  <p>here I get all rows in the database but then I have an option to delete one and I do it, when I do it it deletes that row in the database and then to go back to the main activity I execute code like: </p>
  
  <pre><code>mydb.deleteById(id_to_delete_update);
  Intent intent = new Intent(getApplicationContext(),MainActivity.class);
  startActivity(intent);
  </code></pre>
  
  <p>Where the very first line of code gets executed and we can see all entries but not in proper order for example if I delete the first , go back to the main activity it looks like the second one stays at the place of the first one  and when I press it to get info from the database for it, I send the position +1, but that's not right because that record in the database is number 2, and I am looking for record 1 which actually I just deleted. Please help with some advice.</p>