我无法将用户定义按钮的文本居中

发布于 2024-11-10 17:58:28 字数 116 浏览 2 评论 0原文

我创建了一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

紫轩蝶泪 2024-11-17 17:58:28

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文