Android Question Customlistview question

taylorw

Active Member
Licensed User
Hi all,how to i get the customlistview scroll position?
I already read this post.
https://www.b4x.com/android/forum/t...ds-more-when-scroll-tot-bottom.35761/#content

B4X:
Private Sub sv_ScrollChanged(Position As Int)
   If Position + sv.Height >= sv.Panel.Height Then
     If DateTime.Now > lastAddItemsTime + 200 Then
       lastAddItemsTime = DateTime.Now
       CallSub(CallBack, EventName & "_AddItems")
     End If
   End If
End Sub
But in this code i can't get customlistview scroll position.
 

taylorw

Active Member
Licensed User
Is that true like this?
upload_2017-6-27_17-8-15.png
 

Attachments

  • upload_2017-6-27_17-3-33.png
    upload_2017-6-27_17-3-33.png
    117.1 KB · Views: 156
  • upload_2017-6-27_17-7-58.png
    upload_2017-6-27_17-7-58.png
    21.4 KB · Views: 156
Upvote 0

taylorw

Active Member
Licensed User
Ya Erel,i have using the library.
upload_2017-6-27_17-17-36.png


And i already add this code in the class.
upload_2017-6-27_17-18-47.png


But when i click run, then have this error.
upload_2017-6-27_17-19-28.png
 
Upvote 0

mangojack

Well-Known Member
Licensed User
Longtime User
Firstly .. Uncheck reference to CustomListView Library , you have included the class module instead (.bas)
Next , in the CustomListView Class Globals edit sv AS ScrollView as Public

Then in any module you can call ..
Log(ListView_Order.sv.ScrollPosition)

The error you are getting refers to unmatched sub signature ... Check that the parameters of Sub Create_OrderList matches those you are sending.
Personally i would have populated an map and passed that instead for easier reading.
 
Last edited:
Upvote 0
Top