title: SQLite database issues when deleting entries
body: <p>I'm having some issues working with this SQLite database. Everything worked fine until I added the feature to delete entries. I use a for loop to loop through the entries, but once entries are deleted, not all of the primary keys are between 1 and the number of entries (conditions in my for loop).</p>
  
  <p>This code is part of an activity that displays all of the entries in individual, clickable TableRows. My main issue is how I set my IDs that I use in the OnClickListener.</p>
  
  <p>numFavs is equal to the number of entries in my DB.
  favs is an instance of my Database class.</p>
  
  <pre><code>    for(long i = 1; i &lt;= numFavs; i++) {
          TableRow tr = new TableRow(this);
          tr.setOrientation(TableRow.VERTICAL);
          tr.setClickable(true);
          tr.setOnClickListener(this);
          tr.setId((int)i); //NEED TO FIX THIS
          TextView newTV = new TextView(this);
          newTV.setText(favs.getAddress(i).getString("add"));
          tr.addView(newTV);
          ll.addView(tr);     
  
          TextView spacer = new TextView(this);
          spacer.setHeight(50);
          ll.addView(spacer);
      }
  </code></pre>
  
  <p>It would be ideal to be able to get the ROW_ID (primary key) for each entry and then set the TableRow id to that and also get the Address that pertains to that primary key but..how can I get the primary key of the next entry? Any other method of solving this issue would also be appreciated.</p>
  
  <p>Thanks!!</p>