android:pitfalls of deleting ldpi/mdpi folders

南楼画角 提交于 2019-12-07 05:21:48

问题


I was wondering what are the pitfalls of deleting the ldpi/mdpi/hdpi folders on my android project? Can i just copy all the images in the drawable folder instead?

I did see the following links about UI development for android http://developer.android.com/guide/practices/ui_guidelines/icon_design.html http://developer.android.com/guide/practices/screens_support.html

thanks

PS: I 'm referring to all the images that are being used, background,icons,menus etc...


回答1:


If you want to, go for it. Although not the best practice, if your application is quite conservative in terms of graphics then this may be a reasonable approach.

PROS:

  • Smaller .apk size
  • Easier to manage images (add/edit/remove)

CONS:

  • Images may be too high res or too low res for different screen resolutions.
  • If too high, images are scaled down on the fly which eats up processing power (+ unnecessary memory consumption).
  • If too low, images will lack detail and may look bad.
  • Lower-end devices have a lower memory cap (lowest being 16MB I think) - what may seem to work on your test device may not work on another (OutOfMemoryError!).

Update

If you want a quick way to make icons for all resolutions check out: Android Asset Studio



来源:https://stackoverflow.com/questions/6682038/androidpitfalls-of-deleting-ldpi-mdpi-folders

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!