LWUIT:图像作为表单背景
我已经开始使用 LWUIT,这听起来很有趣,我制作了一个表单并简单地在其背景中添加了一个图像,我的问题是图像被拉伸并且看起来很糟糕:D 有没有办法设置图像不让 strtshd 在表单或任何其他组件上?
I have started using 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 ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这取决于您使用的 LWUIT 版本。在1.4中,您可以将样式中的
bgType
定义为BACKGROUND_IMAGE_ALIGNED,然后将bgAlign
值定义为您想要的任何值(有许多类型/对齐方式)。最新的 SVN 和即将推出的 1.5 通过删除 bgAlign 并将所有对齐/平铺可能性添加到 bgType 来简化此操作,例如
BACKGROUND_IMAGE_TILE_VERTICAL_ALIGN_RIGHT
或BACKGROUND_IMAGE_ALIGNED_TOP_LEFT
等...您可以直观地编辑所有这些在资源编辑器中使用主题。
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 thebgAlign
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
orBACKGROUND_IMAGE_ALIGNED_TOP_LEFT
etc...You can edit all of these visually in the resource editor using the theme.