title: android drawing on a view
body: <p>I try to creare a custom view for circle progress, I draw some points on draw, than I want to crow something over this point while the progress increases, this is my code:</p>
  
  <pre><code>public SpinnerView(Context context) {
              super(context);       
      }
          @SuppressLint("DrawAllocation")
          protected void onDraw(Canvas canvas) {
              //TODO Auto-generated method stub
              super.onDraw(canvas);
  
              float x = 0;
              float y = 0;
  
              for(int i=0; i&lt;360; i = i + 12){
  
                  x = (float) (view.getWidth()/2 + 260 * Math.cos(Math.toRadians(i)));
                  y = (float) (view.getHeight()/2 + 260 * Math.sin(Math.toRadians(i)));
  
                  Paint paint = new Paint();
                  paint.setColor(Color.RED);
                  canvas.drawCircle((float) x, (float) y, 10, paint);
              }   
              viewCanvas = canvas;
          }
  
          public void updateWithProgress (int progress){
  
              // progress : total = x : 36
  
              int point = (360*progress)/total;
              point = point/12;
  
              Log.d("point" + point,"-------");
  
              float x = (float) (view.getWidth()/2 + 260 * Math.cos(Math.toRadians(point)));
              float y = (float) (view.getHeight()/2 + 260 * Math.sin(Math.toRadians(point)));
  
              Paint paint = new Paint();
              paint.setColor(Color.BLUE);
              viewCanvas.drawCircle( x,  y, 20, paint);
          }
      }
  </code></pre>
  
  <p>the problem is that the updateWithProgress not work, it don't draw the blue circle over the old red circle.</p>