难点了解如何支持多屏 [英] Difficulty to understand how to support multiple screen
问题描述
我看到的计算器
这么多的问题,如何支持多屏幕。但是,大部分的答案提供此链接和的这个。而在第一个环节我有这个。我用的屏幕工作大小不一的第一次,所以请帮助我。
XLARGE屏幕至少960dp x 720dp
大屏幕至少640dp x 480dp
正常屏幕至少470dp x 320dp
小屏幕至少426dp x 320dp
而如果 xhdpi
他们提出的 320密度。我很困惑,所以我有以下几个问题。
-
就像如果我想要创建XLARGE屏幕背景图片,然后
960dp x 720dp
意味着我必须创建图像的宽720像素,高960像素和分辨率为320 在纵向模式? -
如果我想创建大屏幕的背景图像,然后
640dp x 480dpp
意味着我必须创建图像的宽度480像素,高度640像素和在纵向模式下的分辨率超过200 -
以上尺寸为横向模式,即
960dp
的宽度和720dp
的高度?
在Android的 -
PX = DP *(DPI / 160)
-
因此,在你的第一个问题
960dp x 720dp
在320dpi
办法1920px x 1440px
在横向模式XLARGE屏幕采用上面的公式。 -
640dp x 480dp
在240dpi
办法960px x 720px
在横向模式的大屏幕。
<一个href="https://blogs.captechconsulting.com/blog/steven-byle/understanding-density-independence-android"相对=nofollow>要详细了解检查。
I have seen so many questions on StackOverFlow
how to support multiple screens. But most of the answers provide this link and this. And in the first one link I have got this. I am working with screen sizes first time so please help me.
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
And in case of xhdpi
they suggest 320 density. I am confused so I have following questions.
Like if I want to create Background image for xlarge screen then
960dp x 720dp
means I have to create image with width 720 pixels and height 960 pixels and resolution 320 in portrait mode?And if I want to create Background image for large screen then
640dp x 480dpp
means I have to create image with width 480 pixels and height 640 pixels and resolution more than 200 in portrait mode?The sizes above is for landscape mode i.e
960dp
for width and720dp
for height ?
In android-
px = dp * (dpi / 160)
So in your first question
960dp x 720dp
at320dpi
means1920px x 1440px
for xlarge screen in landscape mode using above formula.640dp x 480dp
at240dpi
means960px x 720px
for large screen in landscape mode.
To learn more about check this.
这篇关于难点了解如何支持多屏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!