title: Fetching all Contacts and showing them in listview
body: <p>I am showing all contacts in listview and it is working great. But I also want to add image to listview. Searched alot but didn't find any good tutorial. Please suggest some tutorials for showing contact images on listview. Following is my code.</p>
  
  <pre><code>Cursor cur = getContacts();
  
      ListView lv = getListView();
  
      String[] fields = new String[] {ContactsContract.Data.DISPLAY_NAME };
  
  
      adapter = new SimpleCursorAdapter(this,
              R.layout.contacts_list_row, cur, fields,
              new int[] { R.id.title}, 0);
      lv.setAdapter(adapter);
  </code></pre>
  
  <p><strong>getContacts()</strong></p>
  
  <pre><code>private Cursor getContacts() {
      // Run query
      Uri uri = ContactsContract.Contacts.CONTENT_URI;
  
      String[] projection = new String[] { ContactsContract.Contacts._ID,
              ContactsContract.Contacts.DISPLAY_NAME };
      String selection = null;
      String[] selectionArgs = null;
      String sortOrder = ContactsContract.Contacts.DISPLAY_NAME
              + " COLLATE LOCALIZED ASC";
      return managedQuery(uri, projection, selection, selectionArgs,
              sortOrder);
  }
  </code></pre>
  
  <p>Thanks in advance :)</p>