Android Question Vertical alignment align of text in a label - programmatically

mare1980k1

Member
Licensed User
Longtime User
Hi, I am declaring a label as such:
B4X:
Dim TextTrending As Label
TextTrending.Initialize("TextTrending")
TextTrending.Text = "Trending"
TextTrending.Padding = Array As Int (0dip, 0dip, 0dip, 0dip)
TextTrending.Gravity = Gravity.TOP

I would like to align text to the top programmatically in the code, since the label isn't added with the designer, so I don't have that option in the designer.

Do you know how to align the text without the designer?

Thank you,
Kind regards
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…