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

Java Development

Reply
Regular Contributor
geestring
Posts: 68
Registered: 12-19-2011
My Carrier: Virgin Mobile
Accepted Solution

Detect when HorizontalScroll position changes

I created a horizontalfieldmanager that takes up the width of the screen and allows the user to scroll through images. Each bitmap field is the width of the screen as well. I know there is a method getHorizontalScroll to get the current position of the scroll, but how do I know when to call that method? Is there some sort of callback that tells me when a user has scrolled to the next focused image?

 

 

Please use plain text.
Regular Contributor
geestring
Posts: 68
Registered: 12-19-2011
My Carrier: Virgin Mobile

Re: Detect when HorizontalScroll position changes

I'm using api 5.0
Please use plain text.
Regular Contributor
geestring
Posts: 68
Registered: 12-19-2011
My Carrier: Virgin Mobile

Re: Detect when HorizontalScroll position changes

ah I found it setScrollListener() and implement the ScrollChangeListener interface. 

Please use plain text.
Developer
peter_strange
Posts: 14,611
Registered: 07-14-2008

Re: Detect when HorizontalScroll position changes

That is the way, can you mark this as solved?

Please use plain text.