I\'ve in drawable directory an image file with the 960x1440 size. When the app start, the image is not loaded as background and in the logcat I see:
Bitmap t
an image in the /drawable/
folder without any specification is considered to be the "default", that is for 1dp = 1px that is mpdi
, then because the device you're actually running is xxhdpi
that image get's scaled up during runtime.
The original image might be 960x1440, but the conversion from mdpi
to xxhdpi
is 3 times the size, so your 960x1440 becomes (3*960)x(3*1440) = 2880x4320, which is too large of a texture to apply to the hardware accelerated views.
so to fix that is actually pretty simple, you have two choices:
/drawable-nodpi/
that's simple, reduces the .apk size, but lower end devices might struggle to load such a big image.mdpi
, hdpi
, xhdpi
, xxhdpi
to avoid runtime over-scaling and to have smaller images on older devices.