<commit_before>package com.lowlevel.lowholotheme;

import android.app.ProgressDialog;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

public class ProgressDialogHolo extends ProgressDialog {
	/*
	 * Private variables
	 */
	private TextView mTitle;
	private ImageView mIcon;
	
	public ProgressDialogHolo(Context context) {
		super(context);

		final View title = View.inflate(context, R.layout.alert_dialog_title, null);
		
		mTitle = (TextView)title.findViewById(R.id.alertTitle);
		mIcon = (ImageView)title.findViewById(R.id.icon);
		
		setCustomTitle(title);
	}
		
	@Override
	public void show() {
		super.show();
		
		final Button positive = getButton(ProgressDialog.BUTTON_POSITIVE);
		final Button negative = getButton(ProgressDialog.BUTTON_NEGATIVE);
		final Button neutral = getButton(ProgressDialog.BUTTON_NEUTRAL);
		
		if (positive != null)
			positive.setBackgroundResource(R.drawable.button_holo);
		if (negative != null)
			negative.setBackgroundResource(R.drawable.button_holo);
		if (neutral != null)
			neutral.setBackgroundResource(R.drawable.button_holo);
	}

	@Override
	public void setTitle(int textResId) {
		mTitle.setText(textResId);
	}

	@Override
	public void setTitle(CharSequence text) {
		mTitle.setText(text);
	}

	@Override
	public void setIcon(int drawableResId) {
		mIcon.setImageResource(drawableResId);
	}

	@Override
	public void setIcon(Drawable icon) {
		mIcon.setImageDrawable(icon);
	}
}<commit_msg>Set progressbar drawable in progress dialog.<commit_after>package com.lowlevel.lowholotheme;

import android.app.ProgressDialog;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

public class ProgressDialogHolo extends ProgressDialog {
	/*
	 * Private variables
	 */
	private Context mContext;
	private TextView mTitle;
	private ImageView mIcon;
	
	public ProgressDialogHolo(Context context) {
		super(context);
		
		mContext = context;

		final View title = View.inflate(context, R.layout.alert_dialog_title, null);
		
		mTitle = (TextView)title.findViewById(R.id.alertTitle);
		mIcon = (ImageView)title.findViewById(R.id.icon);
		
		setCustomTitle(title);
	}
		
	@Override
	public void show() {
		super.show();
		
		final Button positive = getButton(ProgressDialog.BUTTON_POSITIVE);
		final Button negative = getButton(ProgressDialog.BUTTON_NEGATIVE);
		final Button neutral = getButton(ProgressDialog.BUTTON_NEUTRAL);
		
		if (positive != null)
			positive.setBackgroundResource(R.drawable.button_holo);
		if (negative != null)
			negative.setBackgroundResource(R.drawable.button_holo);
		if (neutral != null)
			neutral.setBackgroundResource(R.drawable.button_holo);
	}

	@Override
	public void setTitle(int textResId) {
		mTitle.setText(textResId);
	}

	@Override
	public void setTitle(CharSequence text) {
		mTitle.setText(text);
	}

	@Override
	public void setIcon(int drawableResId) {
		mIcon.setImageResource(drawableResId);
	}

	@Override
	public void setIcon(Drawable icon) {
		mIcon.setImageDrawable(icon);
	}

	@Override
	public void setProgressStyle(int style) {
		super.setProgressStyle(style);
		
		switch (style) {
		case ProgressDialog.STYLE_HORIZONTAL:
			final Resources res = mContext.getResources();
			
			setProgressDrawable(res.getDrawable(R.drawable.progress_horizontal_holo_dark));
			break;
		}
	}
}
{'fraction_non_alphanumeric': 0.10141706029452625, 'fraction_numerical': 0.0, 'mean_word_length': 5.091370558375634, 'pattern_counts': {'":': 0, '<': 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': '5007671', 'n_tokens_mistral': 1232, 'n_tokens_neox': 1101, 'n_words': 222}