title: Showing database in ListView
body: <p>I am new to android and after going through many tutorials I still can't get things.</p>
  
  <p>I have created a database and is now reading this database.
  This database and 3 columns All three string type.</p>
  
  <p>Now I want to show this database using ListView.I have this <code>ListView</code>
  created with id "<code>listDatabaseItems</code>" in <code>R.layout.viewDatabase</code></p>
  
  <p>Currently my code is:</p>
  
  <pre><code>Cursor c = sqliteDatabase.query(MY_DATABASE_TABLE, null, null, null, null, null, null);
  
  int firstNameColumn = c.getColumnIndex("name_column");
  int protectedColumn = c.getColumnIndex("protected_id_column");
  
  ArrayList&lt;String&gt; results = new ArrayList&lt;String&gt;();
  int i = 0;
  
  c.moveToFirst();
  do {
      i++;
      String firstName = c.getString(firstNameColumn);
      String protectedID = c.getString(protectedColumn);
      results.add(firstName + protectedID); // NEED TO add here 
  } while (c.moveToNext()); 
  
  sqliteDatabase.close();
  </code></pre>
  
  <p>Please tell me what changes I do and how can I show my database in ListView.</p>
  
  <p>Best Regards.</p>