package com.kurukurupapa.tryandroidui.dialog;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.view.View;

public class ColorView extends View {

	private Paint paint;

	public ColorView(Context context) {
		super(context);
		setup();
	}

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

	private void setup() {
		paint = new Paint();
		paint.setStyle(Paint.Style.FILL);

		setMinimumWidth(10);
		setMinimumHeight(10);
	}

	@Override
	protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
		super.onMeasure(widthMeasureSpec, heightMeasureSpec);

//		// 引数で渡された、可能な最大サイズを設定する。
//		int width = MeasureSpec.getSize(widthMeasureSpec);
//		int height = MeasureSpec.getSize(heightMeasureSpec);
//		setMeasuredDimension(width, height);
	}

	@Override
	protected void onDraw(Canvas canvas) {
		super.onDraw(canvas);
	}
}
