title: Android - Using getItemID in an ArrayListAdapter
body: <p>I have scoured SO and the net looking for a solution to my problem.</p>
  
  <p>I am trying to replace a SimpleCursorAdapter with an ArrayListAdapter.</p>
  
  <p>I have successfully created my Adapter class and now need to access the _id value of the array in order to complete some required processing.</p>
  
  <p>I found this <a href="https://stackoverflow.com/questions/10891272/how-to-override-the-getitemidint-pos-method-from-cursoradapter">code</a> that I think will solve my problem but I am getting an error stating that getCursor() is undefined in my adapter.</p>
  
  <pre><code>@Override
  public long getItemId(int position) {
  Cursor cursor = getCursor();
  cursor.moveToPosition(position);
  return cursor.getLong(mCursor.getColumnIndex("_id"));
  </code></pre>
  
  <p>}</p>
  
  <p>There is no cursor in my adapter so I am confused...the ArrayList Adapter works fine as implemented.  Note, however, that when I add the _id field as a member of my Adapter class, only 0 is displayed in the field, yet all other field data is accurate. If I query my database directly, I receive all fields expected and all are accurate.</p>
  
  <p>How do I access the cursor?  And, how do I access the _id value?</p>
  
  <p>Any assistance will be most appreciated.</p>