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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
New Developer
Posts: 28
Registered: ‎07-21-2008
My Device: Not Specified
Accepted Solution

Differences between navigationClick and the TrackWheelListener

Actually i have a few questions here. 

 

What are the differences between navigationClick and the TrackWheelListener?  When should i use which one.  I am trying to follow the MVC model.  

 

Is there any good example of a code that follows MVC model?   

Highlighted
Retired
Posts: 179
Registered: ‎07-14-2008
My Device: Not Specified

Re: Differences between navigationClick and the TrackWheelListener

The TrackwheelListener really should only be used when leveraging a Trackwheel device and performing your own custom handling of the trackwheel movements on the device.  Due to the transition between trackwheel devices (eg. 8700) and trackball devices (eg. 8100 and up) we have mapped the trackball events to the TrackwheelListener in an attempt to provide backwards compatibility.  However, this brings up the following limitations:

 

1) Left and right movement does not exist in a TrackwheelListener but is possible using the Trackball.  As such, users have a suboptimal user experience on a Trackball device.  Many vendors would allow the user to hold down ALT and roll the trackball up and down to indicate left/right movement as a work around.  But again, this isn't the best user experience.

 

2) TrackwheelListener is an independent mechanism from the UI classes.  As such, once you receive notification of a movement or click you are then required to determine which field within your UI needs to operate on that movement or click.  This requires extra processing and code to determine how to handle the event.

 

As such, the recommendation is that you would override the navigationClick, navigationMovement and navigationUnclick methods to handle all trackball movement and trackwheel movement.  This will handle both trackwheel and trackball devices properly which solves #1.  It is also built into the UI classes themselves which reduces the impact of #2 above.

 

The only downside to using these methods is that it requires your application to be built with the 4.2.0 JDE and requires a minimum of 4.2.0 handheld software.  For the large majority of third party developers, v4.2.0 is a sufficient minimum requirement given the proportion of the market that is running 4.2.0 or higher (over 75%).

 

Mike Kirkup
Director, Developer Relations