Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我创建了一个 Button,并将其 UIID 设置为 boutonPpal。我在资源编辑器中将 bgAlign 属性设置为ALIGN_CENTER,但 Button 的文本在运行时未居中!
ALIGN_CENTER
那么如何让文字居中呢?
bgAlign 对齐组件的背景图像。如果使用最新的 LWUIT,请使用“对齐”选项卡。如果您使用的是 1.4,则需要在组件上实际调用 setAlign(),因为在 1.4 中对齐不是主题的一部分。