hi everyone, i'm trying to use this class: https://www.b4x.com/android/forum/t...view-swipe-actions-and-pull-to-refresh.98252/
to add the pulltorefresh functionallity to my customlistview, but i noticed that if the number of elements in the list does not fill the entire screen, the PullToRefresh does not work
To replicate the error just download the example in that post and change the CreateItems sub, decreasing the number of element to 3 or 4 for example.
Then if you try to swipe down nothing happends
P.S. The B4A Version works
to add the pulltorefresh functionallity to my customlistview, but i noticed that if the number of elements in the list does not fill the entire screen, the PullToRefresh does not work
To replicate the error just download the example in that post and change the CreateItems sub, decreasing the number of element to 3 or 4 for example.
B4X:
Sub CreateItems
Dim cs As CSBuilder
For i = 1 To 4
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
Then if you try to swipe down nothing happends
P.S. The B4A Version works
Last edited: