title: Android SDK FingerPaint example
body: <p>I hava a simple question about Android FingerPaint example: <a href="http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/graphics/FingerPaint.html" rel="nofollow">here</a>
  (Websited is updated, my question is regarding old version as explained below)</p>
  
  <p>On of the first things it does is </p>
  
  <p><code>setContentView(new MyView(this));</code></p>
  
  <p>In MyView constructor: (website is updated but when I loaded my Sample from my SDK it was this way, my question is about this code)</p>
  
  <pre><code>    public MyView(Context c) {
          super(c); 
          mBitmap = Bitmap.createBitmap(320, 480, Bitmap.Config.ARGB_8888);
          mCanvas = new Canvas(mBitmap);
          mPath = new Path();
          mBitmapPaint = new Paint(Paint.DITHER_FLAG);
      }
  </code></pre>
  
  <p>This basically makes bitmap of 320 x 480, but when I run this code on my tablet or high-res phone, I noticed that it would scale the bitmap, making the paint object appropriately bigger.</p>
  
  <p>I'd like to have the same effects, but in my own container, myFrameLayout. But when I apply the same MyView to a FrameLayout from my main.xml (omitting findViewById and all),</p>
  
  <pre><code>    setContentView(R.layout.main);
      mV = new MyView(this);
      ((ViewGroup) myFrameLayout).addView(mV);
  </code></pre>
  
  <p>It actually only uses 320 x 480 area of my whole FrameLayout, so it draws fine, but only preserves(when I lift my finger) drawing on a small piece(320 x 480) on the upper-left of myFrameLayout.</p>
  
  <p>How can I make MyView scale and fill the entire size of myFrameLayout using 320 x 480 bitmap as in the SDK example?</p>
  
  <p>(I know I can change 320 x 480 bitmap to appropriate resolution to fill it all, but that's not what I want.)</p>
  
  <p>It's my first time asking question, so please let me know if question is not clear.</p>