Android的,关于用户界面设计 [英] Android, concerning the User Interface design

查看:121
本文介绍了Android的,关于用户界面设计的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我越读支持多画面导,我就越感到困惑。 如果布局文件夹的限定是根据尺寸(小,正常,大和XLARGE 的)和绘制文件夹的预选赛是基于密度( LDPI,MDPI,华电国际和xhdpi 的), 然后点击我怎么能指定可绘制/图像的大小??  应该全部绘制文件夹中的图像具有相同的尺寸(基于普通屏幕大小),但不同的密度(的pic.png内 drawable.ldpi 内部有 drawable.mdpi ,但有不同的密度)?? 的问题是,每个屏幕尺寸可以包括三个密度(的大屏幕可以是LDPI,MDPI或HDPI)。 。怎么可以将我的设计尺寸的基础上,而在同一时间?? 密度的基础图像 谢谢你。

the more I read the Supporting Multiple Screens guide, the more I get confused. if the layout folder's qualifier is based on size (small, normal, large and xlarge) and the drawable folder's qualifier is based on density (ldpi, mdpi,hdpi and xhdpi), then how can I specify the size of the drawables/images?? should all the images inside the drawable folders have the same size (based on the normal screen size) but different densities (i.e. pic.png inside drawable.ldpi has the same width and height of pic.png inside drawable.mdpi but has different density)?? the problem is that each screen size may include the three densities (i.e. a large screen may be ldpi,mdpi or hdpi). .how can I be designing the images on size basis and on density basis on the same time?? thank you.

推荐答案

在一般你会希望在LDPI最小的图片,中间的人在MDPI,并在华电国际等大...

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

尽管这在技术上是可行的设备有一个大屏幕和LDPI密度制造商已经倾向于坚持制造与大屏幕设备更高的密度也是如此。

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.

编辑:

图像仅需要设计与密度记。因为如果你采取同样的100×100像素的图像,并显示在3个不同的密度也将出现最大的(人眼)上的最小密度。因此,考虑到您制作3张图片,可以说一80×80一100×100,和一个120×120。现在,如果你在3个显示这些3的图像密度的对象似乎是你的眼睛的大小会比以前更加接近。

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.

在大,中,小等..预选赛,您可以添加到布局文件夹是不是这么多的任何图像资源本身,而是构建在给定页面上的View组件,使物尽其用可用空间。

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.

例如,如果您的应用程序项目的列表从它选择。上的片剂(大或XLARGE)的屏幕也可能看起来更好和更effecient有在屏幕上的列表中显示的项目的两个或多个列。而在手机上可能没有足够的宽度(纵向模式),以适应在超过1列。因此,为了处理这种情况,你就会把布局文件中,有一列的ListView布局,正常的文件夹内。然后把另一个布局XML文件中使用一个GridView的布局,大文件夹,以便它可以有一个附加列

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

此图像将大致告诉你哪个文件夹,系统会拉你的图像和/或布局XML文件从给定的屏幕尺寸和密度:

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

在有资格与密度的绘制文件夹中的所有图像资源去。 (LDPI,MDPI,华电国际等)

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

布局文件夹是什么让合格的屏幕尺寸(小,中,大等)的布局文件夹将包含XML布局文件而已,没有图像。

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.

这篇关于Android的,关于用户界面设计的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆