简体   繁体   English

多个drawables背景图像,以适应屏幕分辨率

[英]Multiple drawables background images to fit the screen resolutions

Alright, so I have an image that it's resolution is: 1054X1054. 好吧,所以我有一个图像,它的分辨率是:1054X1054。 I want to set that image so it fits exactly the screen size of the android devices. 我想设置该图像,使其完全符合Android设备的屏幕尺寸。 (I'll cut the image in some editor as nessacary). (我将在某些编辑器中剪切图像作为nessacary)。 So my question is: How can I know what resolution my image should be so it will cover the device background without needing to resize the image.(For the mdpi,hdpi,ldpi) 所以我的问题是:我怎么知道我的图像应该是什么分辨率,因此它将覆盖设备背景而无需调整图像大小。(对于mdpi,hdpi,ldpi)

I'm asking that question because I keep missunderstanding how the "multiple screen resolutions" really work.. 我问这个问题,因为我一直在误解“多屏分辨率”是如何工作的。

you can design your image to re-size with different screen sizes, you'll discover that each design requires a minimum amount of space. 您可以设计图像以使用不同的屏幕尺寸重新调整大小,您会发现每个设计都需要最少的空间。 So, each generalized screen size above has an associated minimum resolution that's defined by the system. 因此,上面的每个通用屏幕尺寸都具有由系统定义的相关最小分辨率。

android os count sizes 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. android os计数大小以“dp”为单位 - 在定义布局时应该使用相同的单位 - 这样可以避免系统担心屏幕密度的变化。

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

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

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