Code example for CursorAdapter

    public class CustomCursorAdapter extends CursorAdapter {
        public CustomCursorAdapter(Context context, Cursor c) {
            super(context, c, true);
        public void bindView(View view, Context context, Cursor cursor) {
            String entry = cursor.getString(cursor.getColumnIndex(StatsTagsAndCategoriesTable.Columns.TOPIC));
            int total = cursor.getInt(cursor.getColumnIndex(StatsTagsAndCategoriesTable.Columns.VIEWS));
            String type = cursor.getString(cursor.getColumnIndex(StatsTagsAndCategoriesTable.Columns.TYPE));
            // entries 
            TextView entryTextView = (TextView) view.findViewById(;
            // tag and category icons 
Connect your IDE to all the code out there  Get Codota for Java