<commit_before>package uk.co.threeequals.notepad;

import android.content.Context;
import android.database.Cursor;
import android.support.v4.widget.SimpleCursorAdapter;
import android.view.View;
import android.widget.TextView;

/**
 * Created by michaelwaterworth on 23/03/15.
 */
public class MyListAdapter extends SimpleCursorAdapter {

    public MyListAdapter(Context context, int layout, Cursor cursor, String[] from, int[] to) {
        super(context, layout, cursor, from, to);
    }

    @Override
    public void bindView(View view, Context context, Cursor cursor) {
        // Create the bodyText textview
        TextView bodyText = (TextView) view.findViewById(R.id.textBody);
        bodyText.setText(cursor.getString(cursor.getColumnIndex(NotesDbAdapter.KEY_BODY)));

        // create the typeText textview
        TextView typeText = (TextView) view.findViewById(R.id.textSeverity);
        typeText.setText(cursor.getString(cursor.getColumnIndex(NotesDbAdapter.KEY_TYPE)));
    }
}<commit_msg>Show level<commit_after>package uk.co.threeequals.notepad;

import android.content.Context;
import android.database.Cursor;
import android.support.v4.widget.SimpleCursorAdapter;
import android.view.View;
import android.widget.TextView;

/**
 * Created by michaelwaterworth on 23/03/15.
 */
public class MyListAdapter extends SimpleCursorAdapter {

    public MyListAdapter(Context context, int layout, Cursor cursor, String[] from, int[] to) {
        super(context, layout, cursor, from, to);
    }

    @Override
    public void bindView(View view, Context context, Cursor cursor) {
        // Create the bodyText textview
        TextView bodyText = (TextView) view.findViewById(R.id.textBody);
        bodyText.setText(cursor.getString(cursor.getColumnIndex(NotesDbAdapter.KEY_BODY)));

        // create the typeText textview
        TextView typeText = (TextView) view.findViewById(R.id.textSeverity);
        typeText.setText(cursor.getString(cursor.getColumnIndex(NotesDbAdapter.KEY_TYPE)));

        switch (cursor.getString(cursor.getColumnIndex(NotesDbAdapter.KEY_TYPE))){
            case "important":
                typeText.setTextColor(context.getResources().getColor(R.color.orange));
                break;
            case "urgent":
                typeText.setTextColor(context.getResources().getColor(R.color.red));
                break;
            case "normal":
                typeText.setTextColor(context.getResources().getColor(R.color.green));
                break;
        }
    }
}
{'fraction_non_alphanumeric': 0.10657686212361331, 'fraction_numerical': 0.005546751188589541, 'mean_word_length': 3.353448275862069, 'pattern_counts': {'":': 3, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1692341', 'n_tokens_mistral': 722, 'n_tokens_neox': 683, 'n_words': 145}