开发者

LWUIT : Image as Background in Form

I have started usin开发者_开发百科g LWUIT which sounds interesting , i have made a form and has simply added an image to its background , my problem is that the image is getting streched and looks bad :D is there any way to set an image not to get stretshd on a form or any other component ?


This depends on the version of LWUIT you are using. In 1.4 you could define bgType in the Style to be BACKGROUND_IMAGE_ALIGNED and then define the bgAlign value to whatever you want (there are many types/alignments).

The latest SVN and upcoming 1.5 simplifies this by removing bgAlign and adding to bgType all the alignment/tiling possibilities e.g. BACKGROUND_IMAGE_TILE_VERTICAL_ALIGN_RIGHT or BACKGROUND_IMAGE_ALIGNED_TOP_LEFT etc...

You can edit all of these visually in the resource editor using the theme.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜