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
New Developer
nbajjuri
Posts: 5
Registered: ‎09-22-2009
My Device: Not Specified

NavigationMovement not working 8700 (trackwheel) device

We have implemented navigationMovement method to handle left, right, up and down arrow button handling. And this functionality works fine in all devices with trackball.

 

This is not working for devices with trackwheel (8700). Can someone please help us here?

 

We have used Field and painted the cells(row and columns) in that field using drawRow and would like to navigate among those cells.

 

we dont see any issue with trackball devices.

 

Your help is really appreciated.

Please use plain text.
Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: NavigationMovement not working 8700 (trackwheel) device

I think your best bet is to implement TrackwheelListener in your Screen class, and map the left/right movement to navigationMovement() and map the click to navigationClick().

 

 

public boolean trackwheelRoll(int amount, int status, int time) { return navigationMovement(0,amount,status,time); } public boolean trackwheelClick(int status, int time) { return navigationClick(status,time); }

 

Please use plain text.
Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: NavigationMovement not working 8700 (trackwheel) device

What handheld software version is this 8700 running? 8700 usually comes with v4.1.x out of the box. navigationClick() was introduced in v4.2. Also, I don't know whether navigationClick is triggered by trackwheel at all, even on v.4.2+...
Please use plain text.
Developer
peter_strange
Posts: 19,601
Registered: ‎07-14-2008
My Device: Not Specified

Re: NavigationMovement not working 8700 (trackwheel) device

From memory, and I did test this sometime ago, navigationClick is NOT triggered, even when the OS on the device is upgraded to 4.5.

 

Also to add to the solution presented by RexDoug, on these devices, holding the ALT down while scrolling is usually intended to trigger up and down movement of the focus.  So I would check the status for ALT and use that to determine if the movement should be passed as a movement in the 'x' or 'y' direction (up/down or left/right).  Hope that makes sense.

Please use plain text.
Developer
ronenfe
Posts: 77
Registered: ‎06-03-2009
My Device: Not Specified

Re: NavigationMovement not working 8700 (trackwheel) device

thanks RexDoug, you helped me fix a problem I have been working on for hours with my listfield, I always use the mousewheel to scroll the simulator, and this caused  a problem with highlighting my listfield, the previous row remained highlighted, i fiinally realized the mousewheel activates the trackwheel  so i needed to catch the trackweel event and invalidate the screen. so this fix the problem for devices without a trackball.

 

Please use plain text.