着手做应用背景适合不同设备的最佳方式背景、适合、不同、方式

2023-09-05 09:24:55 作者:澜

所以我在寻找来调剂我的应用程序,未免有一些不错的背景图像和这样。我很好奇,虽然是我如何确保不同的机器人提供正确的?我将后面的文字背景,我需要确保他们为每个不同的屏幕尺寸和分辨率相同的大小和位置?

So I am looking to spice up my application a bit with some nice background images and such. What I am curious about though is how do I make sure that different androids render correctly? I will have backgrounds behind text and I need to make sure they are the same size and location for each different screen dimension and resolution?

在这个任何好的教程?

谢谢!

编辑:

所以,我检查了设在支持多个屏幕上的链接,但我还是有点糊涂了。

So I checked out the link provided on supporting multiple screens but I am still a little confused.

例如说我想用一张图片为背景。在我的设备这将是480×800,但对于雷电,Droid X的,摩托罗拉Droid手机充电,不要等他们都具有略微不同的屏幕尺寸?

Say for instance I want to use a picture for the background. On my device it would be 480x800, but what about the thunderbolt, droid x, moto droid, charge, etc. Dont they all have slightly different screen sizes?

我知道有该LDPI,MDPI,华电国际,xdpi文件夹,这样我就可以使用4张图片,但什么比例将我做出的每一块的?我敢肯定他们是不是所有的480×800(和不同的密度)

I know there is the ldpi, mdpi, hdpi, xdpi folders so I can use 4 images, but what ratio will i make each one at? Im sure they are not all 480x800 (and different densities)

推荐答案

您需要创建不同的图像不同的屏幕密度。

You need to create different images for different screen densities.

正如你说的,你有你的dpi的文件夹,每次取不同尺寸的图像。我用这个网站产生不同尺寸的画面,供各位中找出不同的尺寸,我需要。

As you said, you have your dpi folders, each taking a differently sized image. I used this site which generates differently sized images for you to figure out the different sizes that I would need.