Join Our 3 MILLION+ Members Today! Register Here | Login
Go Back   BlackBerry Forums at CrackBerry.com > BlackBerry Professionals > App Developers

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
    Thread Author   #1  
Old 05-14-2011, 12:32 PM
CrackBerry User
Device(s): 9550 (Storm2)
Carrier: FarEastern
 
Join Date: Feb 2010
Posts: 42
Likes Received: 0
Thanked 0 Times in 0 Posts
Default MIDlet in a Torch: how to receive four-way navigation events?

Hello Blackberry gurus,

I've got a MIDlet running in the Torch. I want to receive the UP, DOWN, LEFT & RIGHT events when user clicks this four-way navigation thingy. How could I do it?

I've tried registering a KeyListener . Then the keyDown() method gets called when user presses any of the buttons in Torch'es hardware keyboard, it also successfully receives the 'BACK' and 'MENU' keys, however- it does NOT get called if user presses the four-way navigation thingy.

I've also tried registering a TrackwheelListener. Then the situation improves a bit: the trackwheelRoll(amount,status,time) function gets called when I swipe my finger on the four-way, however - no matter which way I swipe, (contrary to documentation!) , the 'amount' parameter always is positive which makes it impossible to tell if the swipe was to the left, right, up or down! Absurd if you ask me.
Reply With Quote Tip this Post
    Thread Author   #2  
Old 05-16-2011, 03:14 AM
CrackBerry User
Device(s): 9550 (Storm2)
Carrier: FarEastern
 
Join Date: Feb 2010
Posts: 42
Likes Received: 0
Thanked 0 Times in 0 Posts
Default navigationMovement() in a MIDlet?

looks like the only way to get trackball/four-way navigation events is through overriding the navigationClick/Unclick/Movement methods of the net.rim.device.api.ui.Screen class. This works nicely in a Blackberry application.

However, I'd like to get the trackball/four-way navigation evens in my MIDlet. Any advice?
Reply With Quote Tip this Post
Reply
BlackBerry Forums at CrackBerry.com > > BlackBerry Professionals > App Developers   MIDlet in a Torch: how to receive four-way navigation events?

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes