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
mrdialect2012
Posts: 27
Registered: ‎05-10-2012
My Device: bold 9700

TouchPad Navigation Movement - Simple Scenario - Can Someone Help

Hi Guys,

 

I am looking how to simulate movement with my touchpad as to trigger particular events.

 

I guess the questions I am asking to get me aquainted with how things work are as follows:

 

How Do I Initialise the touchPad so its ready for usage? as in right swipes, left swipes, up down swipes at

a particular velocity/speed.

 

How Do I capture a swipe of the touchpad as to trigger an event: so a right swipe event at a particualr speed would say perhaps call a method of to do some stuff.

 

TouchPad click events, how are these tracked.

 

Again, Just looking for the basics as to how I can get started. Would be great if anyone has any sample code I could look at.

 

Cheers in advance.

Developer
Developer
CMY
Posts: 1,123
Registered: ‎02-10-2009
My Device: 8130 / 8350 / 9530 / 9550 / 9850 / PlayBook

Re: TouchPad Navigation Movement - Simple Scenario - Can Someone Help

You don't need to initialize the TouchPad per se. To determine if the TochPad was swiped just look for a dx/dy greater than 1 or less than -1.

Are you looking at how to simulate those events in code or how to on the simulator?
Contributor
mrdialect2012
Posts: 27
Registered: ‎05-10-2012
My Device: bold 9700

Re: TouchPad Navigation Movement - Simple Scenario - Can Someone Help

Thanks CMY, Yes the simulator, don't know how to trigger the swipes?
Developer
Kiran_Snist
Posts: 174
Registered: ‎01-25-2011
My Device: Not Specified

Re: TouchPad Navigation Movement - Simple Scenario - Can Someone Help

NavigationMovement method should do .......
Developer
Developer
CMY
Posts: 1,123
Registered: ‎02-10-2009
My Device: 8130 / 8350 / 9530 / 9550 / 9850 / PlayBook

Re: TouchPad Navigation Movement - Simple Scenario - Can Someone Help

I haven't used a simulator in forever and don't remember, but I've done it before. I think you can do it with the mouse if you click on the trackpad and move it really quick. Trial and error is the best I can tell you, I know the arrow keys work - maybe try using the control key with it like with mouse keys.
Developer
maadani
Posts: 729
Registered: ‎05-04-2011
My Device: 9700

Re: TouchPad Navigation Movement - Simple Scenario - Can Someone Help

bb1.png

 

At least in the 9550 simulator, you can do this: Edit -> Map Middle Mouse Button -> Toggle Trackball Mode.

 

Hope that helps,

 

E.