AutoComplete mit Name und Nummer wie in der nativen SMS-App Android

Ich möchte eine hinzufügenAutoCompleteTextView in meiner app und suche kontakte nach name und nummer wie in der nativen sms app mit android gemacht. Ich habe im Internet nachgesehen und einige Dinge ausprobiert, aber ich möchte, dass meine Anwendung sie genau wie die Android-SMS-App anzeigt. Hier ist der Code, den ich versuche, der nur nach suchtDisplay_Name.

public class MakePayment extends Activity {
    private AutoCompleteTextView mAuto;

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.makepayment);

        mAuto = (AutoCompleteTextView)findViewById(R.id.autoCompleteTextViewTest);
        ContentResolver content = getContentResolver();
        Cursor cursor = content.query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI,
                PEOPLE_PROJECTION, null, null, null);

        ContactListAdapter adapter = new ContactListAdapter(this, cursor);
        mAuto.setAdapter(adapter);
    }

     public static class ContactListAdapter extends CursorAdapter implements Filterable {
            public ContactListAdapter(Context context, Cursor c) {
                super(context, c);
                mContent = context.getContentResolver();
            }

            @Override
            public View newView(Context context, Cursor cursor, ViewGroup parent) {
                 final LayoutInflater inflater = LayoutInflater.from(context);
                    final TextView view = (TextView) inflater.inflate(
                            android.R.layout.simple_expandable_list_item_1, parent, false);
                    view.setText(cursor.getString(2));
                    return view;
            }        

            @Override
            public void bindView(View view, Context context, Cursor cursor) {
                ((TextView) view).setText(cursor.getString(2));

            }

            @Override
            public String convertToString(Cursor cursor) {
                return cursor.getString(2);
            }

            @Override
            public Cursor runQueryOnBackgroundThread(CharSequence constraint) {
                if (getFilterQueryProvider() != null) {
                    return getFilterQueryProvider().runQuery(constraint);
                }

                StringBuilder buffer = null;
                String[] args = null;
                if (constraint != null) {
                    buffer = new StringBuilder();
                buffer.append("UPPER(");
                buffer.append(ContactsContract.Contacts.DISPLAY_NAME);
                buffer.append(") GLOB ?");
                    args = new String[] { constraint.toString().toUpperCase() + "*" };
                }

                return mContent.query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, PEOPLE_PROJECTION,
                        buffer == null ? null : buffer.toString(), args,
                        null);
            }



            private ContentResolver mContent;           
        }

     private static final String[] PEOPLE_PROJECTION = new String[] {
            ContactsContract.Contacts._ID,
            ContactsContract.CommonDataKinds.Phone.NUMBER,
            ContactsContract.Contacts.DISPLAY_NAME,
        };

}

Wie suche ich auch nach Telefonnummern? Und dann zeige es so an:

Antworten auf die Frage(2)

Ihre Antwort auf die Frage