Android, concerning the User Interface design

最后都变了- 提交于 2019-11-30 15:58:08

In general you'll want the smallest pictures in ldpi, middle ones in mdpi, and larger in hdpi etc...

Even though it is technically possible for a device to have a "large" screen and an "ldpi" density manufactures have tended to stick to making devices with big screens be higher density as well.

EDIT:

The images only need to be designed with density in mind. Because if you take the same 100x100 pixel image and show it at 3 different densities it will appear largest (to human eyes) on the smallest density. So to account for that you make 3 images, lets say one 80x80, one 100x100, and one 120x120. Now if you show those 3 images across 3 densities the size that object appears to be to your eyes will be much closer than before.

the large, medium, small etc... qualifiers that you can add to the layout folders are not so much about any image resources themselves, but rather structuring the View components on the given page so as to make best use of the space available.

For instance, if your application has a list of items to choose from in it. On a tablet (large or xlarge) screen it may look nicer and be more effecient to have two or more columns of items displayed in your list on the screen. Whereas on a handset there may not be enough width (in portrait mode) to fit more than 1 column in. So to handle this situation you'd put a layout xml file inside the layout-normal folder that has a single column ListView. Then put another layout xml file in the layout-large folder that uses a GridView so that it can have an additional column

This image will show you roughly which folder the system will pull your images and/ or layout xml files from given the screen size and density.:

All of your image resources go in the drawable folders which are qualified with the densities. (ldpi, mdpi, hdpi etc)

The layout folders are what get qualified with the screen size (small, normal, large etc) The layout folders will contain xml layout files only, no images.

36x36 for low-density
48x48 for medium-density
72x72 for high-density
96x96 for extra high-density

http://developer.android.com/guide/practices/ui_guidelines/icon_design.html

hope this helps.

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