10

The Nexus 7 is that TVDPI, but that is not used in programming apps for it. Eclipse uses the HDPI, LDPI, MDPI, XHDPI, and XXHDPI folders. After my research, I still have found no solid conclusion.

Four different sources, four different answers:

1.33 x MDPI

HDPI

XHDPI

No direct answer

So my question:

Does anyone really know which density (HDPI/LDPI/MDPI/XHDPI/XXHDPI) the Nexus 7 uses?

Community
  • 1
  • 1
Evorlor
  • 7,263
  • 17
  • 70
  • 141
  • If you ever wonder about a device you have in hand: https://play.google.com/store/apps/details?id=com.jotabout.screeninfo -- free and open source. Life saver. – 323go May 02 '13 at 22:51
  • 3
    On a 2013 Nexus 7 (1920x1200), ScreenInfo shows a screen class of **large**, a density class of **xhdpi**, and a DPI of **320**. – Ben Hutchison Nov 08 '13 at 05:35

3 Answers3

12

The Nexus 7 is that TVDPI, but that is not used in programming apps for it.

It certainly can be. You are welcome to use -tvdpi resource set qualifiers, as is covered in the documentation.

Eclipse uses the HDPI, LDPI, MDPI, XHDPI, and XXHDPI folders.

No, it uses -ldpi, -mdpi, -tvdpi, -hdpi, -xhdpi, and -xxhdpi resource set qualifiers, as is covered in the documentation.

Does anyone really know which density (HDPI/LDPI/MDPI/XHDPI/XXHDPI) the Nexus 7 uses?

It uses -tvdpi, as is covered in the documentation.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • So should i just create a new folder drawable-tvdpi and have an additional layout for it? – Evorlor May 02 '13 at 22:28
  • 2
    @Evorlor: Well, layouts go in `res/layout.../` folders, not `res/drawable...` folders. You are welcome to apply `-tvdpi` to either. Having custom layouts for `-tvdpi` would be bizarre. Having custom drawables for `-tvdpi` is certainly possible but probably overkill. Even Google doesn't do that for the OS artwork. Android will automatically scale a different density's worth of drawables if you fail to provide ones that match the density of the device. So, if you have `-hdpi` drawables, Android will downsample those and use them automatically. – CommonsWare May 02 '13 at 22:32
  • @CommonsWare I have two drawable folders, one with -600dp and another with -tvdpi (exclusively for nexus 7). As nexus 7 takes up the large images, I have put larger images in -tvdpi, however, I notice that Nexus 7 emulator still takes images from -600dp folder. Can you explain a bit about that issue? Or do I need another folder saying layout-tvdpi for referencing the images in -tvdpi drawable folder? –  Sep 12 '13 at 06:35
  • @mANDROID: "I have two drawable folders, one with -600dp and another with -tvdpi" -- do not do this. First, not even Google bothers with `-tvdpi`-specific images. Second, your `-tvdpi` images will not be used on devices that are `-w600dp` or `-sw600dp`, as those criteria are higher priority than is density. Third, Android will treat `-600dp` images as being `-mdpi`, whether that is your intention or not. – CommonsWare Sep 12 '13 at 11:15
  • 1
    @CommonsWare Okay, so what should I do if I want to provide specific sized images only for Nexus 7? I mean in my application, I need to provide the specific sized images for 10", 7" and tweener (5") tablets. For that I have taken three folders, `-sw720dp`, `-sw600dp` and `-sw480dp`, and as far as I have tested with available devices and emulators, its working fine, except Nexus 7. –  Sep 13 '13 at 05:01
  • @mANDROID: "Okay, so what should I do if I want to provide specific sized images only for Nexus 7?" -- don't provide specific-sized images only for Nexus 7. "I need to provide the specific sized images for 10", 7" and tweener (5") tablets" -- except that you are not doing this. You are providing "specific sized images" for any `-mdpi` tablets for select sizes. Right now, that means that ~72% of tablets are using your images. The remaining tablets are going to upsample (or, rarely, downsample) the images to account for the device having a different screen density. – CommonsWare Sep 13 '13 at 11:11
  • @mANDROID: You are welcome to create `-sw720dp-xhdpi`, `-sw600dp-xhdpi`, `-sw480dp-xhdpi`, `-sw720dp-hdpi`, `-sw600dp-hdpi`, `-sw480dp-hdpi`, `-sw720dp-tvdpi`, `-sw600dp-tvdpi`, `-sw480dp-tvdpi`, `-sw720dp-ldpi`, `-sw600dp-ldpi`, and `-sw480dp-ldpi` images to be able to truly provide "specific sized images" for all densities without resampling. But then please do not complain when you waste all your time and/or money on graphic design. And do not complain that, in the future, you spend more for the `...-xxhdpi` and `...-xxxhdpi` variants as well. – CommonsWare Sep 13 '13 at 11:14
  • @CommonsWare Thanks for the information you provided. I think I have things clear in my mind a little. I also try to make use of least drawable folders and least graphics in my app, but the requirement here was for specific sizes. I think I will try `-sw600dp-tvdpi` folder and see if that works. –  Sep 13 '13 at 14:31
  • 3
    @mANDROID: If you do that, rename your `-sw600dp` drawable resource directory to `-sw600dp-mdpi`. Otherwise, all apps will use the `-sw600dp-tvdpi` directory. This is why you usually do not see drawable directories based upon screen size, and never based *only* upon screen size. – CommonsWare Sep 13 '13 at 14:34
  • @CommonsWare Okay, thanks a lot. I will try that and will let you know how it goes. –  Sep 13 '13 at 14:36
  • @CommonsWare rename your -sw600dp drawable resource directory to -sw600dp-mdpi and -sw600dp-tvdpi worked for me. – Ankit Sep 20 '13 at 15:20
  • @CommonsWare There are 2 Nexus 7 devices one with 1200*800 and another with 1200 x 1920 pixels resolution. Can you please tell me from which drawable folder the second one take the images from – KK_07k11A0585 Aug 14 '14 at 07:42
1

enter image description here You can find all the info right in eclise while working with xml layouts. It's very convinient tool to test your design on multiple screens before running on actual devices too.

Defuera
  • 5,356
  • 3
  • 32
  • 38
0

Keep in mind this is for the Nexus 7 ( 2012 ). The more recent Nexus 7 ( 2013 ) resolution is 1200 x 1920, with a density of 320dpi(2.0x)

drawflush
  • 3
  • 4