@Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); paint.setColor(color); if (rad > getHeight() / 2 || rad > getWidth() / 2) canvas.drawCircle(getWidth() / 2, getHeight() / 2, 0, paint); else canvas.drawCircle(getWidth() / 2, getHeight() / 2, rad, paint); }