B4J Code Snippet Multiline Labels Text Alignment

Erel

Administrator
Staff member
Licensed User
The standard Alignment property does not work properly with multiline labels. It aligns the content based on the first line.

You can use this code instead:
B4X:
Dim jo As JavaObject = Label1
jo.RunMethod("setTextAlignment", Array("CENTER"))
 
Top