title: Android SimpleCursorAdapter + ListView not working
body: <p>Hi I ma trying to use a SimpleCursorAdapter to bind values to a list adapter. The cursor is comming from the SQLLite database. However regardless of the results in the cursor (It always has atleast one row) the list view displays the empty message.I am pretty new to android and appreciate any help on this. </p>
  
  <p>My code is given below:</p>
  
  <p><strong>In Activity : Called by onCreate()</strong></p>
  
  <pre><code>private void setupList() {
      if(sesionDao == null) {
          sesionDao = new SessionDAO(this);
      }
      Cursor cursor = sesionDao.retrieveAllSessions();
      startManagingCursor(cursor);
  
      String[] from = new String[]{Database.SES_SESSION_NAME};
      int[] to = new int[]{R.id.sessionNameRow};
      SimpleCursorAdapter sessionAdapter = new SimpleCursorAdapter(this, R.layout.session_list_row,cursor, from, to );
  
      setListAdapter(sessionAdapter);
  }
  </code></pre>
  
  <p><strong>Retrieving the cursor</strong></p>
  
  <pre><code>db = dbHelper.getReadableDatabase();
  
  Cursor c = db.query(Database.SESSIONS_TABLE_NAME, new String[] {
      Database.ID_COLUMN, Database.SES_SESSION_NAME }, null,
                  null, null, null,null);
  </code></pre>
  
  <p><strong>session_list_row.xml</strong></p>
  
  <p><code>
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent" android:layout_height="fill_parent"&gt;
      &lt;TextView android:text="" android:id="@+id/sessionNameRow"
          android:layout_width="wrap_content" android:layout_height="wrap_content"&gt;&lt;/TextView&gt;
  &lt;/LinearLayout&gt;</code></p>
  
  <p><strong>Main Layout</strong>
  <code>&lt;ListView android:id="@android:id/list" android:layout_height="fill_parent" android:layout_width="fill_parent"&gt;&lt;/ListView&gt;
          &lt;TextView android:id="@android:id/empty" android:layout_width="wrap_content"
          android:layout_height="wrap_content" android:text="@string/no_sessions_msg" /&gt;</code></p>