This source file includes following definitions.
- init
- onDraw
package org.chromium.ui;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.widget.Button;
public class ColorPickerMoreButton extends Button {
private Paint mBorderPaint;
public ColorPickerMoreButton(Context context, AttributeSet attrs) {
super(context, attrs);
init();
}
public ColorPickerMoreButton(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
init();
}
public void init() {
mBorderPaint = new Paint();
mBorderPaint.setStyle(Paint.Style.STROKE);
mBorderPaint.setColor(Color.WHITE);
mBorderPaint.setStrokeWidth(1.0f);
mBorderPaint.setAntiAlias(false);
}
@Override
protected void onDraw(Canvas canvas) {
canvas.drawRect(0.5f, 0.5f, getWidth() - 1.5f, getHeight() - 1.5f, mBorderPaint);
super.onDraw(canvas);
}
}