Error in Simple Cursor Adapter, not working
<pre><code>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);
</code></pre>

<p>The cursor query running fine only getting problem in simple cursor adapter.</p>
