internal ColorPickerView(ColorPickerDialog outerInstance, Context c, OnColorChangedListener l, int color) : base(c) { this.outerInstance = outerInstance; mListener = l; mColors = new int[] { unchecked ((int)0xFFFF0000), unchecked ((int)0xFFFF00FF), unchecked ((int)0xFF0000FF), unchecked ((int)0xFF00FFFF), unchecked ((int)0xFF00FF00), unchecked ((int)0xFFFFFF00), unchecked ((int)0xFFFF0000) }; Shader s = new SweepGradient(0, 0, mColors, null); mPaint = new Paint(Paint.ANTI_ALIAS_FLAG); mPaint.Shader = s; mPaint.Style = Paint.Style.STROKE; mPaint.StrokeWidth = 32; mCenterPaint = new Paint(Paint.ANTI_ALIAS_FLAG); mCenterPaint.Color = color; mCenterPaint.StrokeWidth = 5; }
public ColorPickerView(Context c, OnColorChangedListener l, int color) : base(c) { mListener = l; mColors = new int[] { Color.White.ToArgb(), Color.Black.ToArgb(), Color.Red.ToArgb(), Color.Yellow.ToArgb(), Color.Pink.ToArgb(), Color.Green.ToArgb(), Color.Purple.ToArgb(), Color.Blue.ToArgb() }; Shader s = new SweepGradient(0, 0, mColors, null); mPaint = new Paint(PaintFlags.AntiAlias); mPaint.SetShader(s); mPaint.SetStyle(Paint.Style.Stroke); mPaint.StrokeWidth = 32; mCenterPaint = new Paint(PaintFlags.AntiAlias); mCenterPaint.Color = new Color(color); mCenterPaint.StrokeWidth = 5; }
public ColourPickerDialog(Context context, OnColorChangedListener listener, int initialColor) : base(context) { mListener = listener; mInitialColor = initialColor; }
/** * Set a OnColorChangedListener to get notified when the color * selected by the user has changed. * @param listener */ public void setOnColorChangedListener(OnColorChangedListener listener) { mListener = listener; }
/** * Set a OnColorChangedListener to get notified when the color * selected by the user has changed. * @param listener */ public void setOnColorChangedListener(OnColorChangedListener listener){ mListener = listener; }
public ColorPickerDialog(Context ctx, OnColorChangedListener mListener, int mInitialColor) : base(ctx) { this.mListener = mListener; this.mInitialColor = mInitialColor; }
internal ColorPickerView(ColorPickerDialog outerInstance, Context c, OnColorChangedListener l, int color) : base(c) { this.outerInstance = outerInstance; mListener = l; mColors = new int[]{unchecked((int)0xFFFF0000), unchecked((int)0xFFFF00FF), unchecked((int)0xFF0000FF), unchecked((int)0xFF00FFFF), unchecked((int)0xFF00FF00), unchecked((int)0xFFFFFF00), unchecked((int)0xFFFF0000)}; Shader s = new SweepGradient(0, 0, mColors, null); mPaint = new Paint(Paint.ANTI_ALIAS_FLAG); mPaint.Shader = s; mPaint.Style = Paint.Style.STROKE; mPaint.StrokeWidth = 32; mCenterPaint = new Paint(Paint.ANTI_ALIAS_FLAG); mCenterPaint.Color = color; mCenterPaint.StrokeWidth = 5; }