Wish [B4X] SnapCLV and the Sleep timer

wimpie3

Well-Known Member
Licensed User
Longtime User
I'm using xCustomListView with SnapCLV.

The SnapCLV source code basically waits for x milliseconds and checks if the current offset has changed since CustomListView1_ScrollChanged has been fired the last time. This... uhm... well... it's kind of a hack if I may say, and makes the snapping... well.. not "snappy", especially on older phones.

Wouldn't it be easier to add an event inside the CustomListView whenever the paging animation has ended? That would avoid using the Sleep timer to check if the Offset has changed since the last time.
 
How do you decide when the user stopped scrolling, other than finding that the list stopped moving for X milliseconds?
When you take your finger off the display and then wait until the list stops scrolling? ?
Because snapping instantaneously as soon as you release your finger is not a nice behavior either.
 
in my ASScheduler_MonthView I use an instant snap as soon as the user takes the finger off the list, I just remembered.

I can take the code and put it in a class this evening and the op just tries this times out.
 
 
I already took the necessary elements out of ASScheduler_MonthView before your class was ready, thanks Alexander! This is exactly what I was looking for.
 
Back
Top