Answer the question
In order to leave comments, you need to log in
How to stretch an image to the width of the screen from Canvas?
Converted to bitmap blank
Bitmap largeIcon = BitmapFactory.decodeResource(getResources(), R.drawable.res);
c.drawBitmap(largeIcon,0,0,p);
Answer the question
In order to leave comments, you need to log in
Use drawBitmap (Bitmap bitmap, Rect src, Rect dst, Paint paint)
src - null , dst - equal to canvas size.
Draw the specified bitmap, scaling/translating automatically to fill the destination rectangle. If the source rectangle is not null, it specifies the subset of the bitmap to draw.
developer.android.com/reference/android/graphics/C...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question