Joey249
Member
Hi, I have a layout set out which uses a ScrollView and then one CustomListView on the main layout, the ScrollView works to scroll the page, however the CustomListView does not scroll*.
*The CustomListView actually scrolls when running from LeapDroid emulator, but not on my actual phone or other test devices.
I had a look at CLVNested, however that tutorial is based using two CustomListViews rather than a ScrollView + CustomListView, so I wasn't able to wrap my head around on what needed changed or if it even works for my situation, any help would be greatly appreciated .
*The CustomListView actually scrolls when running from LeapDroid emulator, but not on my actual phone or other test devices.
I had a look at CLVNested, however that tutorial is based using two CustomListViews rather than a ScrollView + CustomListView, so I wasn't able to wrap my head around on what needed changed or if it even works for my situation, any help would be greatly appreciated .
B4X:
Sub Class_Globals
Private Root As B4XView 'ignore
Private xui As XUI 'ignore
Private ScrollView1 As ScrollView 'From "LOScrollView" Layout
Private PnlMain As B4XView 'Panel from main layout (LOMainPage) to set ScrollView height
Private CustomListView1 As CustomListView 'From main layout (LOMainPage)
End Sub
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.Loadlayout("LOScrollView") 'ScrollView Layout
ScrollView1.Panel.Loadlayout("LOMainPage") 'Main Layout with CustomListView
ScrollView1.Panel.Height = PnlMain.Height + 10%y
For i = 1 To 10
CustomListView1.AddTextItem("Item " & i,i)
'Only Items 1-4 fits on page and will not scroll to end items
Next
End Sub