Code example for Rfc822Token

0
 
    private final String makeDisplayString(Cursor cursor) {
        String name = cursor.getString(NAME_INDEX);
        String address = cursor.getString(DATA_INDEX);
 
        return new Rfc822Token(name, address, null).toString();
    } 
 
    @Override 
    public final void bindView(View view, Context context, Cursor cursor) {
        ((TextView) view).setText(makeDisplayString(cursor));
    } 
 
    @Override 
    public Cursor runQueryOnBackgroundThread(CharSequence constraint) {
        String filter = constraint == null ? "" : constraint.toString();
        Uri uri = Uri.withAppendedPath(Email.CONTENT_FILTER_URI, Uri.encode(filter));
        return mContentResolver.query(uri, PROJECTION, null, null, SORT_ORDER);
    } 
} 
Contextual code suggestions in your IDE  Get Codota for Java