开发者

Background image size for Android

I have an image that I want to place on the background on my activity. For the G1 I would use a 开发者_如何学Cbackground of 320x480 but with the nexus 1 the resolution is almost double that. Should I just place the large image and make the smaller phones size down? I am trying to keep the size of my package down as much as possible.


If it's a simple colour or a gradient, you can share the same drawable for all screen resolutions.

If it's a more complex graphic, then you should create separate images for different screen resolutions (or densities) by placing them in the appropriate directories (e.g. "drawable-nodpi", "drawable-hdpi" etc.).


A repeatable background image can be the best way to handle device resolution compatibility for simple patterns:

How to make android app's background image repeat

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜