@Override public Cursor runQueryOnBackgroundThread(CharSequence constraint) { FilterQueryProvider filter = getFilterQueryProvider(); if (filter != null) { return filter.runQuery(constraint); } Uri uri = Uri.withAppendedPath( Contacts.CONTENT_FILTER_URI, Uri.encode(constraint.toString())); return mContent.query(uri, CONTACT_PROJECTION, null, null, null); }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.autocomplete_5); ContentResolver content = getContentResolver(); Cursor cursor = content.query(Contacts.CONTENT_URI, AutoComplete4.CONTACT_PROJECTION, null, null, null); AutoComplete4.ContactListAdapter adapter = new AutoComplete4.ContactListAdapter(this, cursor); AutoCompleteTextView textView = (AutoCompleteTextView) findViewById(R.id.edit); textView.setAdapter(adapter); } }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.autocomplete_5); ContentResolver content = getContentResolver(); Cursor cursor = content.query(Contacts.CONTENT_URI, AutoComplete4.CONTACT_PROJECTION, null, null, null); AutoComplete4.ContactListAdapter adapter = new AutoComplete4.ContactListAdapter(this, cursor); AutoCompleteTextView textView = (AutoCompleteTextView) findViewById(R.id.edit); textView.setAdapter(adapter); } }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.autocomplete_4); ContentResolver content = getContentResolver(); Cursor cursor = content.query(Contacts.CONTENT_URI, CONTACT_PROJECTION, null, null, null); ContactListAdapter adapter = new ContactListAdapter(this, cursor); AutoCompleteTextView textView = (AutoCompleteTextView) findViewById(R.id.edit); textView.setAdapter(adapter); }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.autocomplete_4); ContentResolver content = getContentResolver(); Cursor cursor = content.query(Contacts.CONTENT_URI, CONTACT_PROJECTION, null, null, null); ContactListAdapter adapter = new ContactListAdapter(this, cursor); AutoCompleteTextView textView = (AutoCompleteTextView) findViewById(R.id.edit); textView.setAdapter(adapter); }
@Override public Cursor runQueryOnBackgroundThread(CharSequence constraint) { FilterQueryProvider filter = getFilterQueryProvider(); if (filter != null) { return filter.runQuery(constraint); } Uri uri = Uri.withAppendedPath( Contacts.CONTENT_FILTER_URI, Uri.encode(constraint.toString())); return mContent.query(uri, CONTACT_PROJECTION, null, null, null); }