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
Developer
asteroidg
Posts: 52
Registered: ‎11-21-2009
My Device: Not Specified
Accepted Solution

Horizontal Scroll Manager Issue for OS 6.0 and up?

[ Edited ]

Hi to all. I have an issue with Horizontal Scroll Manager . Every thing worked for OS 5.0  and below, the issue comes out for OS 6.0 and up. As an example check the following:

 

I have 2 HFM added to VFM.

HFM1 - contains 2 buttons .

HFM2 - contains 6 buttons and user can scroll between those buttons.

The issues is when user keep hitting the right key, when focus is on second button from HFM1, then the content from HFM2 is scrolled to the right - which is wrong behavior.

 

Check the screenshot for 9810 simulator(when scroll to the right inside the HFM that contains buttons test1, test2 will scroll the second HFM):

9810 simulator

 

Scrolling in one manager scrools in another one why this happen and how that could be solved ?

 

Thank's in advance.

Developer
asteroidg
Posts: 52
Registered: ‎11-21-2009
My Device: Not Specified

Re: Horizontal Scroll Manager Issue for OS 6.0 and up?

It seems that no body else get this issue or what ... ?

 

I was thinking:

1) that is an OS bug but it seems something was deprecated ...

2) i set those HFM1 and HFM2 to have a fixed height and it didn't help

3) in order to stop scrolling i have tried setScrollingInertial(false); - didn't help  to much

4) navigationMovement(int dx, int dy, int status, int time) - could be the solution - but didn't solved yet that

 

 If you have any other ideas, could you please suggest ?

Developer
asteroidg
Posts: 52
Registered: ‎11-21-2009
My Device: Not Specified

Re: Horizontal Scroll Manager Issue for OS 6.0 and up?

Finally I found a solution by using ScrollChangeListener (SCL).

 

So what i have done i set the SCL for HFM2 and then:

 public void scrollChanged(final Manager manager, int newHorizontalScroll,
            int newVerticalScroll) 
    {
        
        //----> fixing the issue when one HFM scroll another one for OS 6.0 and above
        int fwf = manager.getFieldWithFocusIndex();
        if (fwf == -1)
            manager.setHorizontalScroll(0);        
        //<---- fixing the issue when one HFM scroll another one for OS 6.0 and above

}

 Thank's to all anyway.