canvasWidth = canvas.getWidth();
final int canvasHeight = canvas.getHeight();
setupGrid(canvasWidth,canvasHeight);
List<ClockPath> paths = initNumberPaths();
//prendemos / apagamos los paths para mostrar el numero
updatePathsStatesForNumber(paths, currentNumber);
//pintamos el fondo
canvas.drawRect(0,0,canvasWidth,canvasHeight,backgroundPaint);
if(showGridBackground) {
canvas.drawRect(0, 0, canvasSize, canvasSize, squarePaint);
}
if(showGrid)
paintGrid(canvas);
for(ClockPath clockPath : paths){
Paint pathPaint = clockPath.isActive ? activePaint : inactivePaint;
canvas.drawPath(clockPath.path,pathPaint);
}
} private class ClockPath{
Path path;
boolean isActive;
ClockPath(Path path, boolean isActive) {
this.path = path;
this.isActive = isActive;
}
}