title: OnDraw() Method not getting Called
body: <pre><code>// DrawTargetMarker.java
  
      public class DrawTargetMarker extends View {
      //Class type variables
      private SurfaceHolder mHolder;
      private static final String TAG = DrawTargetMarker.class.getSimpleName();
      private int mX, mY;
      private int mRadius = 10;
  
      //Constructor
      public DrawTargetMarker(Context context, int curX, int curY){
          super(context);
          this.mX = curX;
          this.mY = curY;
          // Forces the canvas to draw the object
          invalidate();
      }
      @Override
      public void onDraw(Canvas canvas){
          super.onDraw(canvas);
          // Creating paint instance
          Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
          // Setting the paint's style 
          paint.setStyle(Style.FILL);
          // Setting the width of the stroke
          paint.setStrokeWidth(5);
          // Setting the color of the object to be drawn
          paint.setColor(Color.BLACK);
          // Draw the circle using the specified paint
          canvas.drawCircle(mX, mY, mRadius, paint);  
      }
  }
  
  // RecordShots.java
  
  ...
  ...
  ....
  
  
  recordShots.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View view) {
              recordCount.setText(String.valueOf(count++));
              Log.i(TAG, "Points Recorded ( " + ((TargetTrackerGlobalVariable) getApplicationContext()).getCurrent_x() + "," + ((TargetTrackerGlobalVariable) getApplicationContext()).getCurrent_y() + ")");
              mDrawTargetMarker = new DrawTargetMarker(getApplicationContext(), ((TargetTrackerGlobalVariable) getApplicationContext()).getCurrent_x(), ((TargetTrackerGlobalVariable) getApplicationContext()).getCurrent_y());
  
  // points recorded will be showing two values like (120,20), depending upon the object 
  // position in the view.            
  
  
          }
  
      });
  </code></pre>
  
  <p>So , My query is when I click on the button, is shows me the exact position of the object in the view in the form of (x,y) but I tried to pass that x,y along with the context to the view, so at that x,y I need to place a object and repeat the process until I end.</p>
  
  <p>So the Control is moving to the view, but the problem is that the OnDraw() method  fails to be called, that is responsible for drawing the object in that specified x,y.</p>