Code example for SimpleCursorAdapter

Methods: setAdapter

0
        // Setup our mapping from the cursor result to the display field 
        String[] from = { "name", "isbn" }; 
        int[] to = { android.R.id.text1, android.R.id.text2 }; 
         
        // Create a simple cursor adapter 
        mAdapter = new SimpleCursorAdapter(this, android.R.layout.simple_list_item_2, c, from, to); 
 
        this.getListView().setAdapter(mAdapter); 
    } 
 
}