new String[]{Stream.NAME_FIELD}, new int[]{R.id.name}, 0); streamActvAdapter.setCursorToStringConverter(new SimpleCursorAdapter.CursorToStringConverter() { @Override public CharSequence convertToString(Cursor cursor) { new String[]{Message.SUBJECT_FIELD}, new int[]{R.id.name}, 0); subjectActvAdapter.setCursorToStringConverter(new SimpleCursorAdapter.CursorToStringConverter() { @Override public CharSequence convertToString(Cursor cursor) { new int[]{R.id.name}, 0); emailActvAdapter .setCursorToStringConverter(new SimpleCursorAdapter.CursorToStringConverter() { @Override public CharSequence convertToString(Cursor cursor) {
private void initAutoComplete() { mHistory.open(); String[] from = new String[] { HistoryOpenHelper.COLUMN_REALM }; int[] to = new int[] { android.R.id.text1 }; SimpleCursorAdapter adapter = new SimpleCursorAdapter(this, android.R.layout.simple_dropdown_item_1line, null, from, to, 0); // Set the CursorToStringConverter, to provide the labels for the // choices to be displayed in the AutoCompleteTextView. adapter.setCursorToStringConverter(new CursorToStringConverter() { public String convertToString(android.database.Cursor cursor) { final int columnIndex = cursor .getColumnIndexOrThrow(HistoryOpenHelper.COLUMN_REALM); return cursor.getString(columnIndex); } }); // Set the FilterQueryProvider, to run queries for choices // that match the specified input. adapter.setFilterQueryProvider(new FilterQueryProvider() { public Cursor runQuery(CharSequence constraint) { String partialInput = (constraint != null ? constraint .toString() : ""); return mHistory.getHistoryCursor(partialInput); } }); mSiteAddress.setAdapter(adapter); }
combinedAdapter.setCursorToStringConverter(new SimpleCursorAdapter.CursorToStringConverter() { @Override public CharSequence convertToString(Cursor cursor) {