PNG square with sides of 720 x 720. When drawing it on onDraw, the size becomes much larger, depending on the screen resolution. If the screen is 800x480, then the bitmap size is 1080 x 1080, if 2560x1440 is 2520 x 2520 bitmap (this can be seen with the eye and through bitmap.getWidth () bitmap.getHeight ()) If you measure the size without downloading the bitmap (via BitmapFactory.Options ) it corresponds to the original 720 x 720. I have a suspicion that there is again some nonsense with dpi and px. The actual size of the bitmap on the screen is exactly in pixels, it turns out that the size of PNG (720x720) in parrots? Just in case the code is:
Bitmap bitmap; Paint paint = new Paint(); bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.back); canvas.drawBitmap(bitmap,0,0, paint);