Displaying extra text with a SimpleCursorAdapter
<p><a href="http://developer.android.com/resources/tutorials/notepad/notepad-ex1.html" rel="nofollow">In the Notepad example</a>, they display a list of titles. How would you change it to display a second line with the body text in a smaller font?</p>

<p>Here is the relevant code:</p>

<pre><code>    private void fillData() {
    // Get all of the rows from the database and create the item list
    Cursor notesCursor = mDbHelper.fetchAllNotes();
    startManagingCursor(notesCursor);

    // Create an array to specify the fields we want to display in the list (only TITLE)
    String[] from = new String[]{NotesDbAdapter.KEY_TITLE};

    // and an array of the fields we want to bind those fields to (in this case just text1)
    int[] to = new int[]{R.id.text1};

    // Now create a simple cursor adapter and set it to display
    SimpleCursorAdapter notes =
            new SimpleCursorAdapter(this, R.layout.notes_row, notesCursor, from, to);
    setListAdapter(notes);
}
</code></pre>

<p>And this is notes_row.xml:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;TextView android:id="@+id/text1" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10dp"
android:minWidth="100dp"/&gt;
</code></pre>

<p>The comments clearly state that it only displays the title. I wish it gave me some hints as to how to display the body text as well. (Let's not discuss whether that's a good idea. Let's just assume that that needs to be done, because I'm trying to adapt the Notepad example to my own app.)</p>
