Code example for CursorAdapter

    private class SuggestionsAdapter extends CursorAdapter {
        public SuggestionsAdapter(Context context, Cursor c) {
            super(context, c, 0);
        public View newView(Context context, Cursor cursor, ViewGroup parent) {
            LayoutInflater inflater = LayoutInflater.from(context);
            View v = inflater.inflate(android.R.layout.simple_list_item_1, parent, false);
            return v;
        public void bindView(View view, Context context, Cursor cursor) {
            TextView tv = (TextView) view;
            final int textIndex = cursor.getColumnIndex(SearchManager.SUGGEST_COLUMN_TEXT_1);
Connect your IDE to all the code out there  Get Codota for Java