In B4i, I try to implement Pull to Refresh by using the sample from [B4X] CLVSwipe - xCustomListView Swipe actions and pull to refresh
The sample works when the items populated with content height more than the CustomListView's height but if I have less item, I cannot pull to refresh the list.
I don't have this problem with B4A.
The sample works when the items populated with content height more than the CustomListView's height but if I have less item, I cannot pull to refresh the list.
B4X:
Sub CreateItems
Dim cs As CSBuilder
For i = 1 To 5 '100
cs.Initialize.Color(Rnd(0xff000000, -1))
If i Mod 3 = 0 Then
cs.Append($"Important item ${i} ..."$).PopAll
CustomListView1.AddTextItem(cs, Swipe.CreateItemValue("", Array("Delete", "Do Something Else")))
Else If i Mod 3 = 1 Then
cs.Append($"Very important item ${i} ..."$).PopAll
CustomListView1.AddTextItem(cs, Swipe.CreateItemValue("", Array("Action 1", "Action 2", "Action 3")))
Else
cs.Append($"Nothing to see here ${i}"$).PopAll
CustomListView1.AddTextItem(cs, Null)
End If
Next
End Sub
I don't have this problem with B4A.