title: Canvas in my View sets up as full screen dimensions, rather than View dimensions... why?
body: <p>I have a class that extends View that I draw into.</p>
  
  <p>In spite of the fact that the view is set up as a child to a RelativeLayout that has specific dimensions, the View's canvas reports that it is 1280 wide (which is as wide as the device).</p>
  
  <p>I'm trying to understand what I need to do to have the canvas be constrained by the dimensions of its View (as common sense would dictate).</p>
  
  <p>Curious what I'm overlooking... here are the relevant code snippets...</p>
  
  <pre><code>dv = new DrawView(this, getWindowManager());
      dv.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
  
      //this wrapper is 500x500
      ((RelativeLayout)findViewById(R.id.drawWrapper)).addView(dv);
      L.log("DRAWVIEW WIDTH = " + dv.getWidth()); //this reports 0... why?
  </code></pre>
  
  <p>inside DrawView...</p>
  
  <pre><code>@Override
  public void onDraw(Canvas canvas) {
  
      L.log("CANVAS WIDTH ON DRAW = " + canvas.getWidth()); //this always reports 1280 on xoom
      this.canvas = canvas;
      drawElementsOntoCanvas(canvas, true, false);
      ...     
  }
  </code></pre>
  
  <p>Is there something I'm overlooking or is the canvas inside a View always the width and height of the entire screen?</p>
  
  <p>The XML for the relative layout:</p>
  
  <pre><code>           &lt;RelativeLayout 
              android:id="@+id/drawWrapper"
              android:layout_width="500px"
          android:layout_height="500px"        
          android:layout_centerHorizontal="true"
          android:layout_marginTop="50dip" 
          android:clipChildren="true"
          android:background="@drawable/cut_out_frame"           
          /&gt;  
  </code></pre>