Code example for CursorAdapter

0
    } 
 
    public class CustomCursorAdapter extends CursorAdapter {
 
        public CustomCursorAdapter(Context context, Cursor c) {
            super(context, c, true);
        } 
 
        @Override 
        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(R.id.stats_list_cell_entry);
            entryTextView.setText(entry);
 
            // tag and category icons