1

I am having the following specification images,

xlarge screens are at least 960dp x 720dp
large screens are at least 640dp x 480dp
normal screens are at least 470dp x 320dp
small screens are at least 426dp x 320dp

Both in portrait and landscape. These are stretched in Tablet. But working fine in mobile. I am handling the configuration changes using the onConfigurationChanged() override method. Is any other way for giving the images for Android application. I reffered the following link for screen sizes. http://developer.android.com/guide/practices/screens_support.html

Karthick
  • 1,241
  • 5
  • 20
  • 43
  • I don't understand your question: does your images are background and are you trying to fit them on tablets? – JJ86 Aug 01 '13 at 12:31
  • This approach may help if you have a lot of images: http://stackoverflow.com/questions/17978345/android-image-on-tablets-and-phones/17978396#17978396 – IanB Aug 01 '13 at 12:32
  • @JaAd. It's the Android application splash screen. This is not fit to the tablets. – Karthick Aug 01 '13 at 12:33

3 Answers3

2

you can use drawable-large for tab

Harish Godara
  • 2,388
  • 1
  • 14
  • 28
1

Following crocboy link is correct, and i suggest you to try including more buckets on your app. For example, in my applications i use also this:

drawable-sw600dp-mdpi
drawable-sw720dp-mdpi

In this buckets, put images that match tablets screen, for example in drawable-sw600dp-mdpi insert a background with this size 1280x800 and for drawable-sw720dp-mdpi a background with this size 1920x1200.

It's quite difficult to decide wich tablet to target, because we have different screen size.

EDIT

"application have to support all devices. So, the drawable folder images also have to support for all the devices. How to achieve this?". Basically Android create this 4 folder for drawable:

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

(To be picky, low drawable-ldpi is not quite used, because small device are loosing appeal)But due to density and screen size you can have:

drawable-large-mdpi
drawable-large-hdpi
drawable-large-xhpdi
drawable-xlarge-hdpi
drawable-xlarge-mdpi

And so on with various combination! If you are looking for image perfection (like my graphics collegue, wich is an iOS psychopath) you have to create images for every type of screen, and put it on relative drawable bucket.

JJ86
  • 5,055
  • 2
  • 35
  • 64
  • Thanks for the reply. How to target all the devices instead of the device specific drawable folders? – Karthick Aug 01 '13 at 12:51
  • If I am creating application in general, application have to support all devices. so, the drawable folder images also have to support for all the devices. How to achieve this? – Karthick Aug 01 '13 at 13:00
0

In the same link ("How to Support Multiple Screens"), they tell you how to create seperate drawable folders for each resolution - such as drawable-hdpi. When the system detects a high-resolution screen, it takes drawables from the high-density folders. You can also do the same with layout folders. If it's a low-resolution screen, it uses only images from the low-resolution images folder, drawable-ldpi. Here is also a good article article about how Android picks images from these folders.

crocboy
  • 2,887
  • 2
  • 22
  • 25