How can I get the height of a tab page in a TabHost?
The following code:
Result in following log:
I would like to know the height of the Panel1.
The following code:
B4X:
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Private TabHost1 As TabHost
Private Panel1 As Panel
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
TabHost1.Initialize("TabHost1")
Panel1.Initialize("Panel1")
TabHost1.AddTab2("Test..",Panel1)
Activity.AddView(TabHost1,0,0,100%x,100%y)
Log("Activity.height: " & Activity.Height)
Log("TabHost1.height: " & TabHost1.Height)
Log("Panel1.height: " & Panel1.Height)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Result in following log:
B4X:
** Activity (main) Create, isFirst = false **
Activity.height: 576
TabHost1.height: 576
Panel1.height: -1
** Activity (main) Resume **
I would like to know the height of the Panel1.