views:

345

answers:

1

I have the following code to intantiate a SimpleCursorAdapter to use with a ListView. As you can see I have passed the R.layout.log_item to display the list items, and one value/control to bind to (TripDate).

SimpleCursorAdapter sca = new SimpleCursorAdapter(this, R.layout.log_item,c,new String[] {DBAdapter.KEY_LOG_TRIPDATE},new int[]{R.id.txtTripDate});

this works

I currently only have one widget in the layout xml, a TextView to hold the TripDate. How do I pass multiple binding parameters for the additional widgets in the layout? so I can also display other info.

thanks patrick

+3  A: 
SimpleCursorAdapter sca = new SimpleCursorAdapter(this, R.layout.log_item,c,new String[] {DBAdapter.KEY_LOG_TRIPDATE, DBAdapter.KEY_FOO, DBAdapter.KEY_BAR},new int[]{R.id.txtTripDate, R.id.otherid1, R.id.otherid2});
OcuS
Thats it thank you
patrick