Android Question Calculate label height

Marco Maria Vilucchi

Active Member
Licensed User
Longtime User
Hi all,
I need to create a panel by code.
In this panel i must put some labels.
I'll get the text for the labels from a DB (in this case is a MySql in the web).
Then I don't know how many characters has the text or how many rows it needs.

Thi is the code:

B4X:
Activity.AddView(pnl1,0,0,100%x,100%y)
pnl1.Panel.AddView(lb1, 0, 0, 100%x, lb1h)
pnl1.Panel.AddView(lb2, 0, lb1h, 100%x, lb2h)

lb2 must start at the end of lb1.
But how can I know lb1h?
There is a way to calculate this number?
Thanks in advance
Marco
 
Top