01-14-2020 22:49
01-14-2020 22:49
So I have an application where I need to detect when the user hits the bottom/top of a virtual tile list in order to load in more data.
Currently the only way I have found to do this is to poll the VTList root element every 100ms. The issue is that the the user is dragging the screen at the extremities of the list (so when they hit the top or bottom) the VTList.firstVisibleTile, VTList.value, and VTList.lastVisibleTile all become wrong.
this is some sample data from my app from (the tile list is 25 elements long)
1 0 4
1 0 5
2 0 5
3 0 5
3 0 5
4 0 6
5 0 6
5 0 7
5 0 7
5 1 8
6 3 8
6 3 9
8 5 10
8 5 10
8 5 11
9 7 12
9 7 12
10 7 13
11 8 14
12 9 15
13 10 16
13 10 17
15 12 18
16 12 19
17 12 20
18 13 20
19 14 21
19 14 21
19 14 21
20 15 22
20 15 22
21 15 23
22 15 24
8 15 9
8 15 9
8 15 9
8 15 9
8 15 9
as you can see things work properly until just after we show element 24 (the last element), then for what ever reason it starts showing that the view range is from 8 to 9.
also if there is a way to tell when a tile becomes visible on screen (via an event handler) that would be super helpful