Cursor searchCursor = getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI,
new String[] {"_id",Phone.DISPLAY_NAME}, Phone.DISPLAY_NAME + " like ?",
new String[]{ "%" + cc.get("contactName").toString() + "%"}, null);
startManagingCursor(searchCursor);
while(searchCursor.isAfterLast() == false) {
final String name = searchCursor.getString(searchCursor.getColumnIndex(Phone.DISPLAY_NAME));
final String number = searchCursor.getString(searchCursor.getColumnIndex(Phone.NUMBER));
str =new String[]{name,number};
ada = new SimpleCursorAdapter(this, R.layout.view_contacts_listview_layout, searchCursor, str, new int[] { R.id.contactName, R.id.contactPhoneNo });
}
lvSearch.setAdapter(ada);
カーソルクエリが正常に実行されると、単純なカーソルアダプタでのみ問題が発生します。