24

I'm gonna release my app, it's a 1.2Mb apk that includes about 120 icons in 4 different formats (ldpi, mdpi, hdpi, x-hdpi).

If I add xx-dpi and xxx-hdpi icons the apk grows bigger and loading time increases.
There are many entry-level devices out there with really loooow memory and I'd like my app to run everywhere.

Do I really need to add xx-hdpi?

And is there a real device that requires xxx-hdpi?

Bö macht Blau
  • 11,639
  • 4
  • 30
  • 53
j.c
  • 2,636
  • 3
  • 24
  • 43
  • 5
    Loading times don't increase based on the size of your app, it's all about how much you do at one time. Don't do everything at the same time and your app will be fine. – RED_ Jan 30 '14 at 09:32
  • @RED_ yep, while testing through adb with all those big icons I seemed to see a slowdown, but maybe it was being installed... – j.c Jan 30 '14 at 09:57

8 Answers8

31

You shouldn't really need xxxhdpi. It was only introduced because of the way that launcher icons are scaled on the nexus 5's launcher

Edit Back when I answered in Jan 2014, the Nexus 5 was the only device using xxxhdpi. Now many devices including the Nexus 6 and LG G3 use it. So it would be a good idea to include it in your app.

John
  • 599
  • 5
  • 10
  • 2
    Because the nexus 5's default launcher uses bigger icons, xxxhdpi was introduced so that icons would still look good on the nexus 5's launcher – John Jan 30 '14 at 10:06
  • 1
    oh, now i understand! I didn't know KitKat uses bigger launcher icons! http://cdn.arstechnica.net/wp-content/uploads/2013/11/app-drawerscale.jpg – j.c Jan 30 '14 at 10:12
  • 7
    As an owner of a Nexus 5, please *please **please*** don't omit the high-quality icon. It looks sloppy and blurry. – George Hilliard May 21 '14 at 14:51
  • @thirtythreeforty I also own a Nexus 5 and can't wait for the day when people properly support xxx-hdpi :) – John May 21 '14 at 15:10
  • 11
    The LG G3 uses xxxhdpi as the default density – josebama Jun 23 '14 at 15:22
  • 1
    You do **not** need `drawable-xxxhdpi` for images; it says not to use them. It only says you need `mipmap-xxxhdpi` for launcher icons. See http://developer.android.com/guide/practices/screens_support.html for more details. – Matt Quigley Apr 07 '15 at 17:33
  • 7
    @MattQuigley That page is a bit outdated; [Google has since said that it's fine to include drawable-xxxhdpi assets in your APK.](http://android-developers.blogspot.com/2014/10/getting-your-apps-ready-for-nexus-6-and.html) – CloudyMusic Apr 09 '15 at 23:29
  • If you use apk-split and want to avoid the universal then you really need the xxx assets. – slott Aug 18 '16 at 11:37
9

We had to add xxxhdpi to our app for the Nexus 6, LG G3, and Samsung Galaxy Note 4. There will be more xxxdhpi devices in the future.

ToddH
  • 2,701
  • 2
  • 25
  • 27
6

You do not need xxxhpdi for most of your images. You only need xxxhdpi for your launcher icon. Please see http://developer.android.com/guide/practices/screens_support.html

You should not use the xxxhdpi qualifier for UI elements other than the launcher icon.

It's pretty clear in the above quote. In the example folder layout they give, they show all the densities for the res/drawable folders up to -xxhdpi, but then they show the res/mipmap folders up to -xxxhdpi. Here are more quotes:

xxxhdpi Resources for extra-extra-extra-high-density (xxxhdpi) uses (~640dpi). Use this for the launcher icon only, see note above.

The mipmap-xxxhdpi qualifier is necessary only to provide a launcher icon that can appear larger than usual on an xxhdpi device. You do not need to provide xxxhdpi assets for all your app's images.

Community
  • 1
  • 1
Matt Quigley
  • 6,792
  • 3
  • 22
  • 26
  • Interesting: `"180x180 (3.0x) for extra-extra-high-density"`. Well, 1.0x is 48 pixels, so 48 * 3 = 144. Where did the get 180 from? – Csaba Toth Dec 27 '15 at 21:34
5

You don't need ldpi, because Android downsizes hdpi to ldpi.

From https://developer.android.com/design/style/iconography.html

Note: Android also supports low-density (LDPI) screens, but you normally don't need to create custom assets at this size because Android effectively down-scales your HDPI assets by 1/2 to match the expected size.

5

From Android iconography documentation itself:

Some devices scale-up the launcher icon by as much as 25%. For example, if your highest density launcher icon image is already extra-extra-high density, the scaling process will make it appear less crisp. So you should provide a higher density launcher icon in the drawable-xxxhdpi directory, which the system uses instead of scaling up a smaller version of the icon.

Note: the drawable-xxxhdpi qualifier is necessary only to provide a launcher icon that can appear larger than usual on an xxhdpi device. You do not need to provide xxxhdpi assets for all your app's images.

more on: http://developer.android.com/design/style/iconography.html

ygbr
  • 753
  • 9
  • 14
  • Android docs on that xxxhdpi isn't needed: https://developer.android.com/guide/practices/screens_support.html#xxxhdpi-note – Mac_Cain13 Jun 19 '15 at 09:53
4

I don't know if there is a device that requires xxx-hdpi, but xx-hdpi is not yet used very often. But the same goes for ldpi, almost no device still requires ldpi. If you just do mdpi, hdpi and xhdpi, it will be just fine. If a device requires something bigger or smaller android just scales it to the right size.

Heres what Android says about this:

Provide different bitmap drawables for different screen densities

By default, Android scales your bitmap drawables (.png, .jpg, and .gif files) and Nine-Patch drawables (.9.png files) so that they render at the appropriate physical size on each device. For example, if your application provides bitmap drawables only for the baseline, medium screen density (mdpi), then the system scales them up when on a high-density screen, and scales them down when on a low-density screen. This scaling can cause artifacts in the bitmaps. To ensure your bitmaps look their best, you should include alternative versions at different resolutions for different screen densities. The configuration qualifiers you can use for density-specific resources are ldpi (low), mdpi (medium), hdpi (high), and xhdpi (extra high). For example, bitmaps for high-density screens should go in drawable-hdpi/.

You can find the documentation here:

https://developer.android.com/guide/practices/screens_support.html

Hope this helps

Kevin van Mierlo
  • 8,967
  • 5
  • 39
  • 66
  • I thought the nexus 5 was using the xx-hdpi category, isn't it ? – Ektos974 Apr 11 '14 at 08:59
  • I'm not sure, I know the xperia z does. This is an answer that will explain it: http://stackoverflow.com/a/13215729/2767703 – Kevin van Mierlo Apr 11 '14 at 16:26
  • But won't xhdpi look sloppy on xx-hdpi? Now iPhone6 Plus already uses 3x assets which is roughly equal to xx-hdpi and I figure there should be some quite significant difference. – xji Dec 19 '14 at 06:52
  • @AnonJ I've never seen any sloppy image in my apps (I have samsung S4 which I think also has xxhdpi). But it is indeed better to make the images for xxhdpi. – Kevin van Mierlo Dec 19 '14 at 07:41
2

I think you should focus on the most popular screen densities, which are hdpi, xhdpi, and xxhdpi. See this link for the current worldwide average distribution of each density.

Stan Kurdziel
  • 4,611
  • 1
  • 35
  • 38
Shailendra Madda
  • 16,925
  • 14
  • 71
  • 115
-5

Forget Everything & make it Simple !

Just store highest resolution images in only one folder. Either in drawable-hdpi, & delete other images from the rest drawable folders.

I have tested it in various devices & it works like a charm...

Vivek Warde
  • 1,776
  • 7
  • 41
  • 77
  • 1
    down voted because this doesn't provide additional information. There is automatic scaling yes, that's the context of the question. And FYI: xxxhdpi is currently the highest resolution defined. – Stan Kurdziel Aug 24 '15 at 00:36