Android Question Alignment label in runtime mode

dibesw

Active Member
Licensed User
Longtime User
Is it possible align label in runtime mode? like this:

align.jpg
 

Linostar

Member
Licensed User
Longtime User
Yes
B4X:
Label1.Gravity = Gravity.CENTER_HORIZONTAL
If you need to combine alignments then you do this:
B4X:
Label1.Gravity = Bit.OR(Gravity.CENTER_HORIZONTAL, Gravity.CENTER_VERTICAL)

I think that Gravity.CENTER combines both vertical and horizontal gravities.
 
Upvote 0
Top