// Path: src/com/example/lovetalk/util/PixelUtil.java
// public class PixelUtil {
// 	private static Resources resources = Resources.getSystem();
// 	private static int desityDpi = resources.getDisplayMetrics().densityDpi;
// 	private static float scaledDensity = resources.getDisplayMetrics().scaledDensity;
// 
// 	public static int dp2px(float value) {
// 		final float scale = desityDpi;
// 		return (int) (value * (scale / 160) + 0.5f);
// 	}
// 
// 	public static int px2dp(float value) {
// 		final float scale = desityDpi;
// 		return (int) ((value * 160) / scale + 0.5f);
// 	}
// 
// 	public static int sp2px(float value) {
// 		float spvalue = value * scaledDensity;
// 		return (int) (spvalue + 0.5f);
// 	}
// 
// 	public static int px2sp(float value) {
// 		final float scale = scaledDensity;
// 		return (int) (value / scale + 0.5f);
// 	}
// }


import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Typeface;
import android.graphics.drawable.ColorDrawable;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import android.widget.TextView;
import com.example.lovetalk.R;
import com.example.lovetalk.util.PixelUtil;

	private TextView textDialog;

	public void setTextView(TextView mTextDialog) {
		this.textDialog = mTextDialog;
	}

	public EnLetterView(Context context, AttributeSet attrs, int defStyle) {
		super(context, attrs, defStyle);
	}

	public EnLetterView(Context context, AttributeSet attrs) {
		super(context, attrs);
	}

	public EnLetterView(Context context) {
		super(context);
	}

	protected void onDraw(Canvas canvas) {
		super.onDraw(canvas);
		int height = getHeight();
		int width = getWidth();
		int singleHeight = height / letters.length;

		for (int i = 0; i < letters.length; i++) {
			paint.setColor(getResources().getColor(
					R.color.color_bottom_text_normal));
			paint.setTypeface(Typeface.DEFAULT_BOLD);
			paint.setAntiAlias(true);
// Path: src/com/example/lovetalk/util/PixelUtil.java
// public class PixelUtil {
// 	private static Resources resources = Resources.getSystem();
// 	private static int desityDpi = resources.getDisplayMetrics().densityDpi;
// 	private static float scaledDensity = resources.getDisplayMetrics().scaledDensity;
// 
// 	public static int dp2px(float value) {
// 		final float scale = desityDpi;
// 		return (int) (value * (scale / 160) + 0.5f);
// 	}
// 
// 	public static int px2dp(float value) {
// 		final float scale = desityDpi;
// 		return (int) ((value * 160) / scale + 0.5f);
// 	}
// 
// 	public static int sp2px(float value) {
// 		float spvalue = value * scaledDensity;
// 		return (int) (spvalue + 0.5f);
// 	}
// 
// 	public static int px2sp(float value) {
// 		final float scale = scaledDensity;
// 		return (int) (value / scale + 0.5f);
// 	}
// }


// Path: src/com/example/lovetalk/view/EnLetterView.java
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Typeface;
import android.graphics.drawable.ColorDrawable;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import android.widget.TextView;
import com.example.lovetalk.R;
import com.example.lovetalk.util.PixelUtil;


	private TextView textDialog;

	public void setTextView(TextView mTextDialog) {
		this.textDialog = mTextDialog;
	}

	public EnLetterView(Context context, AttributeSet attrs, int defStyle) {
		super(context, attrs, defStyle);
	}

	public EnLetterView(Context context, AttributeSet attrs) {
		super(context, attrs);
	}

	public EnLetterView(Context context) {
		super(context);
	}

	protected void onDraw(Canvas canvas) {
		super.onDraw(canvas);
		int height = getHeight();
		int width = getWidth();
		int singleHeight = height / letters.length;

		for (int i = 0; i < letters.length; i++) {
			paint.setColor(getResources().getColor(
					R.color.color_bottom_text_normal));
			paint.setTypeface(Typeface.DEFAULT_BOLD);
			paint.setAntiAlias(true);
			paint.setTextSize(PixelUtil.sp2px(12));