I have HorizontalFieldManager
,VerticalFieldManager
and LabelField
. LabelField
placed in HorizontalFieldManager
and multiple HorizontalFieldManager
are placed in VerticalFieldManager
.
When i try to get LabelField height using labelfield.getHeight(); it returns 0 . if there are multiple line in Labelfield, it also give me height returns 0. same issue i m facing for HorizontalFieldManager
.
After getting there height i want to calculate VerticalFieldManager
height and set height dynamically for the screen.
How can i calculate the height of Label or Horizontalfieldmanager?
Use
labelField.getPreferredHeight()
andmanager.getPreferredHeight()
notlabelField.getHeight()
This should work for you