Question

My Android application is not loading the correct graphic images when running on a Galaxy tab 1.0. They look blurry and slightly pixelated.

My guess is that it is loading the images from the mdpi folder, because the device density is 1.0, but they are small for the tablet screen.

What should I do in this case? I don't want to increase the size of the images in the mdpi folder, because I have tested the application in a fair quantity of emulators and devices and it worked well, but I still want a way of loading bigger images for the tablet.

The device model is GT-P7510 and Android version is 3.1. The density of the device is 1.0, which I got using the code:

getResources().getDisplayMetrics().density

I have different image sizes placed in the folders:

  • drawable-hdpi
  • drawable-ldpi
  • drawable-mdpi
  • drawable-xhdpi

I am developing in API level 8, platform 2.2.

Thanks!

Was it helpful?

Solution

you should probably create

res/drawable-large-mdpi/

and put resources for large screens there. Instead of large you may evaluate to use other qualifiers, such as drawable-sw600dp, see http://developer.android.com/guide/practices/screens_support.html and http://developer.android.com/guide/topics/resources/providing-resources.html#BestMatch

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top