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:26

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...

查看更多
Deceive 欺骗
3楼-- · 2019-01-17 11:27

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

查看更多
登录 后发表回答