Thanks Erel for trying to help.
I have the following sub that sets things up. I am loading/scraping webpages to display the info and that happens as HttpJob calls the JobDone method.
In this code Panel0 seems ok but everything else is 37dips too tall. The last 3 lines help get around the issue partially; only the last Info panel is resized since that was the last panel loaded using the LoadLayout.
Like I mentioned earlier maybe this is a AHViewPager issue but seems more like a LoadLayout issue to me.
Sub PagerSetup()
Dim title As String
mPagerContainer.Initialize
Dim pnlName As String
For x = 0 To 7
Dim pi As PanelInfo
pi.Initialize
Dim pnl As Panel
pnl.Initialize("")
title = gMenuNames(x)
Select x
Case 0
pnlName = "Panel0"
wvForecast.Initialize(title)
pnl.AddView(wvForecast, 0, 0, FILL_PARENT, FILL_PARENT)
case 6
pnlName = "Webcam"
pnl.LoadLayout("Webcam")
Case 7
pnlName = "Maint"
pnl.LoadLayout("Maint")
Case Else
pnlName = "PnlInfo" & x
pnl.LoadLayout("Info")
End Select
pi.PanelName = title
pnl.Tag = pi
mPagerContainer.AddPage(pnl, title)
Next
'Create the Pager view.
mPager.Initialize(mPagerContainer, "mPager")
'show the tabs page indicator
mPagerTabs.Initialize(mPager)
mPagerTabs.LineHeight = 5dip
mPagerTabs.UpperCaseTitle = False
mPagerTabs.LineColorCenter = Colors.Blue
Activity.AddView(mPagerTabs, 0, 0, FILL_PARENT, WRAP_CONTENT)
'We add a line below the tab page indicator because it looks good
Dim col As ColorDrawable
col.Initialize(mPagerTabs.LineColorCenter, 0)
mPagerLine.Initialize("")
mPagerLine.Background=col
Activity.AddView(mPagerLine, 0, 35dip, Activity.Width, 2dip)
'add the pager to the activity
Activity.AddView(mPager, 0, 35dip + 2dip, Activity.Width, Activity.Height-35dip-2dip)
' Ensure all panels have correct height.
Activity.RerunDesignerScript("Maint", Activity.Width, Activity.Height - 37dip)
Activity.RerunDesignerScript("Webcam", Activity.Width, Activity.Height - 37dip)
Activity.RerunDesignerScript("Info", Activity.Width, Activity.Height - 37dip)
end sub