title: Sort a contact list from my phone
body: <p>I retrieve a list of my contacts from my phone, How can i sort them ?
  i tried with adapter.sort but error can't resolve methode sort !</p>
  
  <pre><code>     listcontact = (ListView) rootView.findViewById(R.id.listcontact);
  
      Cursor cursor = getActivity().getContentResolver().query(
              ContactsContract.CommonDataKinds.Phone.CONTENT_URI
              ,new String[]{
              ContactsContract.CommonDataKinds.Phone._ID,
              ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME ,
              ContactsContract.CommonDataKinds.Phone.NUMBER
              }
              ,null
              ,null
              ,null
      );
  
      getActivity().startManagingCursor(cursor);
  
      String[] from = new String[] {
              ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME,
              ContactsContract.CommonDataKinds.Phone.NUMBER
      };
  
      int[] to = new int[] { R.id.name, R.id.phone};
  
      SimpleCursorAdapter adapter = new SimpleCursorAdapter(getContext(), R.layout.listcontact, cursor, from, to);
  
      adapter.sort(new Comparator&lt;String&gt;() {
          @Override
          public int compare(String lhs, String rhs) {
              return lhs.compareTo(rhs);
          }
      });
      listcontact.setAdapter(adapter);
  </code></pre>