Android SimpleCursorAdapter-绑定到ListView中的多个项值

Android SimpleCursorAdapter-绑定到ListView中的多个项值,android,listview,Android,Listview,我有下面的代码来说明与ListView一起使用的SimpleCorsorAdapter。如您所见,我已经传递了R.layout.log_项以显示列表项,以及一个要绑定的值/控件(TripDate) 这很有效 我目前在布局xml中只有一个小部件,一个用于保存TripDate的TextView。 如何为布局中的其他小部件传递多个绑定参数?因此,我还可以显示其他信息 谢谢 帕特里克 SimpleCursorAdapter sca = new SimpleCursorAdapter(this, R.la

我有下面的代码来说明与ListView一起使用的SimpleCorsorAdapter。如您所见,我已经传递了R.layout.log_项以显示列表项,以及一个要绑定的值/控件(TripDate)

这很有效

我目前在布局xml中只有一个小部件,一个用于保存TripDate的TextView。 如何为布局中的其他小部件传递多个绑定参数?因此,我还可以显示其他信息

谢谢 帕特里克

SimpleCursorAdapter sca = new SimpleCursorAdapter(this, R.layout.log_item,c,new String[] {DBAdapter.KEY_LOG_TRIPDATE},new int[]{R.id.txtTripDate});
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});