2

I'm testing my app at Galaxy Tab and Motorola XOOM emulator skins, and I can't understand, why the drawables are taken from the wrong folders. I have drawable-xhdpi folder, where I store big size pictures. However, Tab takes drawables from drawable-hdpi, and XOOM uses the drawable-mdpi folder. So, how do I manage my resources? Thanks in advance.

In addition, it feels like view sizes defined in sp are not ported properly. I have some views which need to be 80sp x 80sp, on phones with mdpi and hdpi screens they look right, but on tablets they look too small. Why can this be?

Egor
  • 39,695
  • 10
  • 113
  • 130
  • In my case, the Xoom strangely uses sw600-xhdpi resources when I am providing sw600-hdpi resources. I'd think that because it's an mdpi device, it'd use hdpi since it's closer to its dpi. – Gallal May 07 '13 at 16:14

5 Answers5

3

However, Tab takes drawables from drawable-hdpi, and XOOM uses the drawable-mdpi folder. So, how do I manage my resources?

There is no single "Galaxy Tab" device, so I have no idea which one you are referring to there. The XOOM is an -mdpi device. I would expect that the Galaxy Tab 10.1 would be -mdpi as well. However, in the end, device manufacturers will choose values that they feel deliver the best results for existing applications.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
2

GalaxyTab 7" use "-large-hdpi"; XOOM 10.1" use "-xlarge-mdpi".

check this post for details: GalaxyTab, Motorola Xoom Screen Desity and Size

situee
  • 2,710
  • 2
  • 22
  • 27
1

I have test with multiple screen resolutions and find out Android use the following qualifier for different screen resolutions: 240x320: -ldpi 320x480: -mdpi 480x800: -hdpi GalaxyTab7.1 inches: -large GalaxyTab10.1 inches: -xlarge

Hope this information is useful for you.

Tam Vo
  • 157
  • 1
  • 3
  • 5
0

Galaxy tab (the old one, running Android 2.x) is indeed not xhdpi. I had success by using the "large" qualifier to identify tablets. Else you can always use an API qualifier such as v11 for Honeycomb only resources.

Vincent Mimoun-Prat
  • 28,208
  • 16
  • 81
  • 124
0

Rather than using the dpi qualifiers you can use screen size qualifiers instead, theres info here on exactly what tags you can use when selecting which resources to use,

http://developer.android.com/guide/topics/resources/providing-resources.html

It's important to understand the difference between dpi and screen size, dpi tends to be high on phones, like a samsung galaxy s2, but on the big 10 inch tablets it tends to be low(which makes sense if you think about it, the phones squeeze more pixels into a smaller space).

gunboatmedia
  • 435
  • 1
  • 6
  • 15