私はAndroidリストビューを持っていて、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);
text1 が "NameA v NameB" になるように (SQL クエリを変更せずに) 2 つの名前を連結するにはどうすればよいでしょうか...
前もって感謝します