开发者

How to display a tiled background for all resolutions?

I have a texture.png which I would like to tile, to create a textured background for my window.

Will I run into any problems with different screen resolutions?

If so, what is the best way to support a textured background for multiple devices?

Should I have 1 im开发者_C百科age instead? How large should it be?


You should create 3 different versions of your texture and place them in the ldpi, mdpi and hdpi folders appropriately. You can find more on the different densities here. In order to create a background drawable, create an XML file like it is described here: http://developer.android.com/resources/articles/window-bg-speed.html

The attribute android:tileMode="repeat" will do the magic stuff for you. :-)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜