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 Contributor
astajim
Posts: 7
Registered: ‎05-10-2011
My Device: 8310
My Carrier: TMUS

Trackball listener for Left and Right movement.

 Hello All,

 

Could you please give me some direction or something to catch Trackball action for LEFT and RIGHT movement from Canvas class, instead of boolean navigationMovement(int dx, int dy, int status, int time) from Screen class.

 

I already found method boolean trackwheelRoll( int amount, int status, int time) and running well to catch UP and DOWN trackball direction from Canvas Class but cannot catch LEFT and RIGHT actions.

 

Is in Blackberry have method like keyRepeated in MIDP for Trackball?

 

Thank You.

Please use plain text.
Trusted Contributor
NGeldenhuys
Posts: 176
Registered: ‎04-12-2012
My Device: Bold 9780 & Curve 8250
My Carrier: vodacom

Re: Trackball listener for Left and Right movement.

hello there 

 

Did you ever find a code snippet for the above mentioned?

 

Thank you

Please use plain text.
Developer
Eugen
Posts: 467
Registered: ‎07-16-2009
My Device: Z10 LE
My Carrier: Vodafone NL

Re: Trackball listener for Left and Right movement.

I think for left/right movement you will get trackWhellRoll with UP/DOWN and status ALT

Please use plain text.
Trusted Contributor
NGeldenhuys
Posts: 176
Registered: ‎04-12-2012
My Device: Bold 9780 & Curve 8250
My Carrier: vodacom

Re: Trackball listener for Left and Right movement.

Hi there

 

Please can you go in to a bit more detail or give a code snippet. I am very new to development.

 

Thank you

Please use plain text.
Developer
peter_strange
Posts: 19,595
Registered: ‎07-14-2008
My Device: Not Specified

Re: Trackball listener for Left and Right movement.

@NGeldenhuys

 

I think this question is specifically targeted at MIDLet applications.  I think you are writing normal RIMLet applications, in which case you override naviagiotionMovement() in the Field or Screen that you wish to capture the information.  Look at the API and search the forum for more information on coding navigationMovement. 

Please use plain text.
Trusted Contributor
NGeldenhuys
Posts: 176
Registered: ‎04-12-2012
My Device: Bold 9780 & Curve 8250
My Carrier: vodacom

Re: Trackball listener for Left and Right movement.

Hi Peter_strange

 

Thank you. Will do 

Please use plain text.
New Contributor
astajim
Posts: 7
Registered: ‎05-10-2011
My Device: 8310
My Carrier: TMUS

Re: Trackball listener for Left and Right movement.

Hello,

 

I use MIDlet instead of RIMlet. I use primitive MIDlet key handling to catch the trackball event from method keyPressed() and using time counter to let it repeated.

 

It can solve my problem and hope useful for you.

Please use plain text.