I'm porting my app from B4A to B4I. In B4A The code shown below works to display all the items in an array in a scrollview. In B4I only the last item displays (in it's proper location at the bottom of the scrollview). The log shows that the loop is running and that there is text in each of the llabel labels. I have tried setting the scrollview to .visible or .bringtofront or .requestfocus but nothing works. Also experimented with dips which I guess I don't need in B4I.
B4X:
Sub Start
PF.Initialize("PF")
PF.RootPanel.LoadLayout("ProfileLayout")
scv1.Panel.LoadLayout("PFPanel")
scv1.ContentHeight = Panel1.Height
scv1.ContentWidth = scv1.Width
Main.NavControl.ShowPage(PF)
End Sub
Sub LoadLayout
Dim llabel As Label
Dim Row As Int = 1
Dim ScrollPosition As Int = 0
llabel.Initialize("llabel")
qname.text = "Q1 of " & QuestionArray.NumberOfQuestions & ": " & QuestionArray.Question(Row,0)
For x = 1 To QuestionArray.ButtonsPerQuestion(Row)
llabel.text = QuestionArray.Question(Row,x)
Log("x = " & x & " llabel = " & llabel.text)
scv1.Panel.AddView(llabel,10, ScrollPosition, 110, 50)
ScrollPosition = ScrollPosition+40
Next
End Sub