if(flag){ paint.setColor(firstColor); canvas.drawCircle(getWidth()/2,getHeight()/2,100,paint); paint.setColor(secondColor); canvas.drawArc(new RectF(getWidth()/2-100,getHeight()/2-100,getWidth()/2+100,getHeight()/2+100),-90,progress,false,paint); }