Android xxx-hdpi real devices

2019-01-17 10:30发布

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?

8条回答
唯我独甜
2楼-- · 2019-01-17 11:05

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.

查看更多
何必那么认真
3楼-- · 2019-01-17 11:07

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.

查看更多
何必那么认真
4楼-- · 2019-01-17 11:09

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.

查看更多
爷、活的狠高调
5楼-- · 2019-01-17 11:10

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

查看更多
Fickle 薄情
6楼-- · 2019-01-17 11:14

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.

查看更多
三岁会撩人
7楼-- · 2019-01-17 11:18

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.

查看更多
登录 后发表回答