how to display complete Bitmap in android using Canvas?
<p>friends,</p>

<p>i am using following onDraw method to display bitmap on screen.</p>

<pre><code> @Override
            public void onDraw(Canvas canvas) {

                    Bitmap _scratch =  BitmapFactory.decodeResource(getResources(), R.drawable.icon2);

                    //ImageView img= new ImageView(Tutorial2D.this);
                    //img.setImageBitmap(_scratch);
                    canvas.drawColor(Color.BLACK);

                    canvas.drawBitmap(_scratch, 0, 0, null);


            }
</code></pre>

<p>image is displayed on the screen but some part because android screen is small
how can i display complete image in whole android screen?</p>

<p>can i set ScaleType of image to fitxy in canvas ? </p>

<p>or</p>

<p>can i add android layout image to this canvas so that i could set fitxy property or image there as i have commented the code?</p>

<p>any help would be appreciated.</p>
