How to center text in ListView

brogrammer

New Member
Licensed User
Longtime User
Is it possible to center the text in the listview? If yes, how?

Thanks,
Brogrammer.
 

klaus

Expert
Licensed User
Longtime User
Yes !
In the three layouts you can define the Gravity property for each label, like
B4X:
ListView1.TwoLinesLayout.Label.Gravity = Gravity.CENTER_HORIZONTAL
ListView1.TwoLinesLayout.SecondLabel.Gravity = Bit.Or(Gravity.CENTER_VERTICAL, Gravity.CENTER_HORIZONTAL)
Best regards.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…