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);
游标查询运行良好仅在简单游标适配器中出现问题。