Make list from two database items

Posted by unnamet on Stack Overflow See other posts from Stack Overflow or by unnamet
Published on 2011-09-21T19:33:38Z Indexed on 2012/03/18 17:57 UTC
Read the original article Hit count: 592

Filed under:
|
|

I want to make a list from some data that I have in my database.

The first two sets of data in my database are first name and last name.

I want my list to show both first and last name instead of now where it only shows the first name. How do I do that? My code looks like this:

    private void fillData() 
{
     Cursor contactCursor = mDbHelper.fetchAllReminders();
     startManagingCursor(contactCursor);

     String[] from = new String[]{DbAdapter.KEY_FIRST};

     int[] to = new int[]{R.id.contactlist};

     SimpleCursorAdapter contacts = new SimpleCursorAdapter(this, R.layout.list, contactCursor, from, to);
     setListAdapter(contacts);

}

© Stack Overflow or respective owner

Related posts about android

Related posts about database