Pergunta de entrevista da empresa Glassdoor

How would you determine the scroll speed on a ListView?

Resposta da entrevista

Sigiloso

12 de jan. de 2016

1. Subscribe to the onscroll event of the multiple select element 2. In the event handler push the time of the event into an array outside of the handler 3. When the array changes a separate event handler takes the average You'd probably need to play with the threshold of when it determines that you've stopped scrolling so that you could clear the array. if you wanted to display real time speed you'd have to get more clever with the calculations, but overall I think this is how you'd accomplish determining the scroll speed.