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

Java Development

Reply
Contributor
swet_hi
Posts: 15
Registered: ‎07-01-2011
My Device: 8110
Accepted Solution

SetHoritonzalScroll with animation not working JDE 5.0.0

 

I want to give sliding animation effect when scrolling is done, thus I used setHorizontalScroll(int position, boolean animate)  with animate = true,

 

In JDE 6 it works perfectly and correctly,

 

In JDE 5 for non-touch devices it does not work at all i.e scroll is done but animation does not occurs

 

For JDE 5 touch device scroll is done with animation but scroll set to incorrect position

 

For e.g.. setHorizontalScroll(360,true) in result it sets to 273.

 

 

Please use plain text.
BlackBerry Development Advisor
MSohm
Posts: 14,684
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook

Re: SetHoritonzalScroll with animation not working JDE 5.0.0

The ScrollView class was added in version 6.0, which means you cannot use it in 5.0.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
Contributor
swet_hi
Posts: 15
Registered: ‎07-01-2011
My Device: 8110

Re: SetHoritonzalScroll with animation not working JDE 5.0.0

I have reported as bug in blackberry Issue tracker
Please use plain text.
BlackBerry Development Advisor
MSohm
Posts: 14,684
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook

Re: SetHoritonzalScroll with animation not working JDE 5.0.0

This isn't a bug.  The class you are trying to use was not created until 6.0.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
Contributor
swet_hi
Posts: 15
Registered: ‎07-01-2011
My Device: 8110

Re: SetHoritonzalScroll with animation not working JDE 5.0.0

Then in 5.0 why they have provided api for setHorizontalScroll with amination.
Please use plain text.
BlackBerry Development Advisor
MSohm
Posts: 14,684
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook

Re: SetHoritonzalScroll with animation not working JDE 5.0.0

What class are you using?  ScrollView was added in 6.0.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
Contributor
swet_hi
Posts: 15
Registered: ‎07-01-2011
My Device: 8110

Re: SetHoritonzalScroll with animation not working JDE 5.0.0

I am using custom class which extends HorizontalFieldManager.

 

And in navigationMovement method I am setting setHorizontalScroll(360,true);

 

My horizontal manager has greater than 1000 width and it is scrollable.

 

Moreover I did POC simple in a verticalFieldManager I added horizontal Manager scrollable and has enough width for scrolling and on button click it try horizontalManager.setHorizontalScroll(100,true);

 

Result

 

It set the horizontal scroll to 100 but without animation. I tried in blb 9630

Please use plain text.
BlackBerry Development Advisor
MSohm
Posts: 14,684
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook

Re: SetHoritonzalScroll with animation not working JDE 5.0.0

The ScrollView class that was added in version 6.0 is responsible for the animations you see when scrolling.  Many of its methods are part of the base Manager class, which is what you are using in 5.0.  The base methods in Manager do not contain animations.

 

So while the methods do exist in 5.0, the animation feature you are looking for was added in 6.0 by way of the ScrollView class.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.