Best way to go about making application background

2019-03-31 05:30发布

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?

Any good tutorials on this?

Thanks!

EDIT:

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

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?

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)

3条回答
萌系小妹纸
2楼-- · 2019-03-31 06:01

Take a look at Supporting Multiple Screens in the Dev Guide.

查看更多
孤傲高冷的网名
3楼-- · 2019-03-31 06:04

If your background image is somewhat uniform in texture, consider using a single 9-patch image instead of using multiple images for ldpi, mdpi, hdpi.

Using 9-patch images also takes care of differing aspect-ratios for each of ldpi, mdpi, hdpi.

查看更多
迷人小祖宗
4楼-- · 2019-03-31 06:11

You need to create different images for different screen densities.

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.

查看更多
登录 后发表回答