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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

BlackBerry WebWorks Contributions

Reply
BlackBerry Development Advisor
tneil
Posts: 3,693
Registered: ‎10-16-2008
My Carrier: Rogers

[API Candidate] Scroll Events

[ Edited ]

Hi Everyone,

 

I have recently added a new scroll event handler in my github fork of the BlackBerry WebWorks project.

 

 

The event object will allow you to subscribe to scrolling events on the screen.  This will allow you to trap scrolling events and react to new scroll positions.  You can see how these can be combined with CSS & DOM manipulation to create fixed toolbars:

 

 

You can find the source code here:

https://github.com/tneil/WebWorks/tree/master/api/ui/event/

 

 

========================================================
REQUIRED FEATURE ID
========================================================
<feature id="blackberry.ui.event" version="1.0.0"/>
========================================================
SUMMARY
========================================================
static void onScrollStart(callback : OnScrollStart)
static void onScrollEnd(callback : OnScrollEnd)
OnScrollStart()
OnScrollEnd(verticalPosition, horizontalPosition)
========================================================
CODE EXAMPLE
========================================================
function foo()
{
  blackberry.ui.event.onScrollStart( function() {
    alert('starting to scroll');
  });
  blackberry.ui.event.onScrollEnd(function(vPos, hPos) {
    alert('Vertical Position: ' + vPos + ' Horizontal Position: ' + hPos);
  });
}

 

 

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
Contributor
vipintomer
Posts: 41
Registered: ‎05-03-2012
My Carrier: -

Re: [API Candidate] Scroll Events

 

 

hey Tim,

 

I have sent a lot of post about the scroll issue on phone gap sencha but still not found any suitable fixes.

 

we are using the x-blackberry-focusable="true" id="100" x-blackberry-onUp="scrollReg()" x-blackberry-onDown="scrollReg()"

with every element and scroll elements using scrollReg function but this is quite slow and at the time of loading mask

showing this scroll is still working.

 

 

Please suggest some optimal solution.

 

Thanks

Vipin Tomer

Please use plain text.
Developer
BrajeshSanodiya
Posts: 101
Registered: ‎08-03-2011
My Carrier: BlackBerry Developer

Re: [API Candidate] Scroll Events

Hi tneil,

 

It is getting 404 error. plz upload it again.

 

here is the link mention below 

 

https://github.com/tneil/WebWorks/tree/master/api/ui/event/

 

plz check this link and update once.

-----------------------------------------------------------------------
"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
-----------------------------------------------------------------------
Please use plain text.
BlackBerry Development Advisor
tneil
Posts: 3,693
Registered: ‎10-16-2008
My Carrier: Rogers

Re: [API Candidate] Scroll Events

The code is now located here:

 

https://github.com/blackberry/WebWorks-Community-APIs/tree/master/Smartphone/Screen

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.