title: Make listview from SQLite database
body: <p>I'm trying to populate listview from my SQLite database... this is how I get my data from database:</p>
  
  <pre><code>    Cursor c = database.rawQuery("SELECT * FROM " + TableName, null);
      int Column1 = c.getColumnIndex("uri");
      int Column2 = c.getColumnIndex("file");
      int Column3 = c.getColumnIndex("id");
      c.moveToFirst();
      if (c != null) {
          do {
              String uri = c.getString(Column1);
              String file = c.getString(Column2);
              int id = c.getInt(Column3);
          } while (c.moveToNext());
      }
  </code></pre>
  
  <p>I would normally add an array to listview like that:</p>
  
  <pre><code>    ListView my_listview2 = (ListView) findViewById(R.id.listView1);
      String my_array[] = {"Android", "iPhone"};
      my_listview2.setAdapter(new ArrayAdapter&lt;String&gt;(this, R.layout.row, R.id.my_custom_row, my_array));
  </code></pre>
  
  <p>How can I make an array to setadapter from my sql query?</p>