我无法将用户定义按钮的文本居中
我创建了一个 Button,并将其 UIID 设置为 boutonPpal。我在资源编辑器中将 bgAlign 属性设置为 ALIGN_CENTER,但按钮的文本在运行时未居中!
那么如何让文字居中呢?
I created a Button and I set its UIID to boutonPpal. I set the bgAlign attribute to ALIGN_CENTER
in the resource Editor but the text of the Button is not centered at runtime !
So how to make the text centered ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
bgAlign 对齐组件的背景图像。如果使用最新的 LWUIT,请使用“对齐”选项卡。如果您使用 1.4,则需要在组件上实际调用 setAlign(),因为在 1.4 中对齐不是主题的一部分。
bgAlign aligns the background image of a component. Use the "Align" tab if using the latest LWUIT. If you are using 1.4 you need to actually invoke setAlign() on the component since in 1.4 alignment was not a part of the theme.