Reputation: 462
Contrary to what is shown in the sample usage section of the SpanLabel documentation, where the text is centered by default, the text of my SpanLabel is left-aligned (see screenshot from simulator below). How can I center it?
Upvotes: 2
Views: 353
Reputation: 91
Programatically this worked for me (aligning to the right):
spLabel3.getTextAllStyles().setAlignment(Component.RIGHT);
Upvotes: 1
Reputation: 52760
SpanLabel
has a setTextUIID
method that allows you to determine the UIID of the text within. This defaults to Label
for ease of use but you can change that to anything you want and define that to be centered.
Upvotes: 3