sw600dp 和 w600dp 的区别? [英] Difference between sw600dp and w600dp?
问题描述
请简单说明sw
和w
的区别.我研究了有关屏幕尺寸的完整文档,但对这两个限定符 sw<> 和 w<> 感到困惑.
Please elaborate on the difference between sw<N>dp
and w<N>dp
, in a simple way. I have studied the complete documentation of screen sizes but am confused between these two qualifiers sw<> and w<>.
推荐答案
Android 设备屏幕是矩形.矩形有两条边,一条比另一条短.我们称短的 A 和长的 B.
Android device screens are rectangles. Rectangles have two sides, one shorter than the other. Let's call the short one A and the long one B.
-swNNNdp
表示如果 A 的长度大于或等于 NNN dp
,则使用这些资源"
-swNNNdp
indicates "use these resources if A is greater than or equal to NNN dp
in length"
-wNNNdp
表示如果当前持有的设备宽度大于或等于 NNN dp
"
-wNNNdp
indicates "use these resources if the width of the device, as presently held, is greater than or equal to NNN dp
"
当用户在纵向和横向之间旋转设备时,宽度会发生变化(为 A 或 B),但 A(最短宽度)始终相同.
When the user rotates the device between portrait and landscape, the width will change (to be A or B), but A (the shortest width) is always the same.
这篇关于sw600dp 和 w600dp 的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!