Tried that approach but clearly missing something. I'm just getting a blank activity with just the activity title.
Here is the layout file "LongLayout":
And here is the code:
B4X:
Sub Globals
Private scrollView1 As ScrollView
Private pnl_myPage As B4XView
Private lbl_myTitle As B4XView
Private btn_Back As B4XView
Private lbl_Subheading1 As B4XView
Private lbl_Subheading2 As B4XView
End Sub
Sub Activity_Create(FirstTime As Boolean)
scrollView1.Initialize(0)
scrollView1.Panel.LoadLayout("LongLayout")
Activity.AddView(scrollView1,0,0,100%x,100%y)
End Sub
Sub Activity_Create(FirstTime As Boolean)
scrollView1.Initialize(0)
Activity.AddView(scrollView1,0,0,100%x,100%y)
scrollView1.Panel.LoadLayout("LongLayout")
scrollView1.Panel.Height = pnl_myPage.Height
End Sub
You could also define a layout with the ScrollView using anchors.
It is a mistake to load a layout before the parent size is set. It should be:
B4X:
scrollView1.Initialize(870dip) 'based on the inner layout height
Activity.AddView(scrollView1,0,0,100%x,100%y)
scrollView1.Panel.LoadLayout("LongLayout")
Sub Activity_Create(FirstTime As Boolean)
scrollView1.Initialize(0)
Activity.AddView(scrollView1,0,0,100%x,100%y)
scrollView1.Panel.LoadLayout("LongLayout")
scrollView1.Panel.Height = pnl_myPage.Height
End Sub
You could also define a layout with the ScrollView using anchors.
It is a mistake to load a layout before the parent size is set. It should be:
B4X:
scrollView1.Initialize(870dip) 'based on the inner layout height
Activity.AddView(scrollView1,0,0,100%x,100%y)
scrollView1.Panel.LoadLayout("LongLayout")