简体   繁体   English

屏幕支持手机,而非平板电脑

[英]Screen support for mobile phones, not tablet

This provides a very deep insight for handling multiple screen resolutions in the application. 为处理应用程序中的多种屏幕分辨率提供了非常深刻的见解。 And here I am still confused. 在这里,我仍然感到困惑。 This reference says 这个参考说

As you design your UI for different screen sizes, you'll discover that each design requires a minimum amount of space. 在为不同的屏幕尺寸设计UI时,您会发现每种设计都需要最小的空间。 So, each generalized screen size above has an associated minimum resolution that's defined by the system. 因此,上面的每个通用屏幕尺寸都有一个由系统定义的关联的最小分辨率。 These minimum sizes are in "dp" units—the same units you should use when defining your layouts—which allows the system to avoid worrying about changes in screen density. 这些最小尺寸以“ dp”单位(定义布局时应使用的单位)为单位,这使系统避免担心屏幕密度的变化。

 xlarge screens are at least 960dp x 720dp large screens are at least 640dp x 480dp normal screens are at least 470dp x 320dp small screens are at least 426dp x 320dp 

This is where I have got confused. 这就是我感到困惑的地方。 Aren't these the landscape/ tablet dimensions ? 这些不是风景/平板电脑的尺寸吗? For a mobile phone isn't this just the opposite ? 对于手机来说,这不是相反吗?
So, does it has to be, say 320dp x 426dp for a phone or is there something I haven't understood ? 因此,电话必须是320dp x 426dp ,还是我不了解的东西?
Also, what will be the portrait resolutions I have to consider. 另外,我必须考虑的纵向分辨率是多少。

This is where I have got confused. 这就是我感到困惑的地方。

At this point, landscape/portrait are not yet in the picture. 此时,风景/肖像尚未出现。 Consider this: 考虑一下:

A: What are the dimensions of an A4 sheet?
B: 8.5" x 11"

Another version: 另一个版本:

A: What are the dimensions of an A4 sheet?
B: In what orientation are you holding the sheet?
A: Landscape
B: 11" x 8.5"

xlarge screens are at least 960dp x 720dp
large screens are at least 640dp x 480dp
normal screens are at least 470dp x 320dp
small screens are at least 426dp x 320dp 

The above dimensions are being reported using landscape as the orientation. 以上尺寸是使用景观作为方向来报告的。

Aren't these the landscape/ tablet dimensions ? 这些不是风景/平板电脑的尺寸吗? For a mobile phone isn't this just the opposite ? 对于手机来说,这不是相反吗?

Not when you have decided that all dimensions are going to be reported in landscape orientation. 当您决定要以横向显示所有尺寸时,则不会。

So, does it has to be, say 320dp x 426dp for a phone or is there something I haven't understood? 因此,电话必须是320dp x 426dp,还是我不了解的东西? Also, what will be the portrait resolutions I have to consider. 另外,我必须考虑的纵向分辨率是多少。

Since we've established the dimensions in landscape, flipping these will give us the portrait dimensions - resolution is an entirely different, orientation-independent, classification criterion. 由于我们已经在景观中建立了尺寸,翻转这些尺寸将为我们提供肖像尺寸 -分辨率是完全不同的,独立于方向的分类标准。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM