Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Highlighted
Contributor
Posts: 40
Registered: ‎05-12-2012
My Device: 9800
My Carrier: Virgin mobile

Detecting scroll speed in Webworks

Hi,

 

I am working on a project where I have a number of messages on screen. Each message has a number of highlightable areas to it such as name, group etc. When using focused based navigation I have move up and down throuh all elements of the message, onto next message etc etc.

 

But what I now need to do is detect if the user is scrolling fast and if so move down an message at a time rather than an item at a time.

 

How can i detect the speed of the scroll wheel. is there an api call. I have trawled the docs and I can't find anything.

 

AHMA (any help much appreciated) 

Retired
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Detecting scroll speed in Webworks

No I'm not aware of an API to measure scrolling speed.

 

I haven't done this myself, but I would guess you could create your own solution. You may be able to do the following?

 

1) Assign an event listener to each relevant content element displayed on the page.

2) Make this listener watch for when the content becomes visible?

3) Measure the interval of time between these events.

4) Calculate how fast the page is being scrolled based on these measurements?

 

No guarantees on this - not sure whether this proposed solution would impact performance.

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.