Hi, All
If the list of items to show has become empty after selecting from a db - there is a trouble with PreOptimizedCLV that has PCLV.ShowScrollBar = true.
Touching the scrollbar gives error
Any suggestion ?
If the list of items to show has become empty after selecting from a db - there is a trouble with PreOptimizedCLV that has PCLV.ShowScrollBar = true.
Touching the scrollbar gives error
And it's unclear how to avoid it, setting PCLV.ShowScrollBar = false - does not work.Error occurred on line: 165 (PreoptimizedCLV)
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.get(ArrayList.java:411)
...
B4X:
PCLV.Initialize(Me, "PCLV", CustomListView1)
If curPics.RowCount > 0 Then
For i = 1 To curPics.RowCount Step 4
curPics.Position = i
PCLV.AddItem(height, xui.Color_White, CreateMyImageData(i))
Next
PCLV.ShowScrollBar = True
PCLV.ExtraItems = 3
PCLV.Commit
Else
PCLV.ShowScrollBar = False
PCLV.Commit
ToastMessageShow("Empty list", False)
End If
Any suggestion ?
Last edited: