我有一个 android listview,它有一个 two_line_list_item 布局.... text1 和 text2
我有一个 SQL 查询,它返回我的光标....在下面的示例中,我将 SQL 中的 NameA 设置为 text1,将 NameB 设置为 text2
// Create an array to specify the fields we want to display in the list (only TITLE)
String[] from = new String[]{"NameA", "NameB"};
// and an array of the fields we want to bind those fields to (in this case just text1)
int[] to = new int[]{android.R.id.text1, android.R.id.text2};
// Now create a simple cursor adapter and set it to display
SimpleCursorAdapter matches = new SimpleCursorAdapter(this, android.R.layout.two_line_list_item, MatchesCursor, from, to);
setListAdapter(matches);
我怎么能去连接这两个名字(不改变我的 SQL 查询)所以 text1 将是“NameA v NameB”......
提前致谢