BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 09-17-2009, 09:57 AM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Mar 2005
Model: 8100
Carrier: T-Mobile Germany
Posts: 26
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Trackball movement in ObjectListField

Please Login to Remove!

Hi,

I have created a standard ObjectListField and want to catch the horizontal trackball movement, when the field is active, i.e. when an item is selected and the trackball is moved to the right or moved to the left.

Can anybody help?

Thanks!

Regards,
Malte
Offline  
Old 09-17-2009, 10:43 AM   #2 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

Have you tried overriding navigationMovement()?
Offline  
Old 09-17-2009, 02:25 PM   #3 (permalink)
Knows Where the Search Button Is
 
Join Date: Mar 2005
Model: 8100
Carrier: T-Mobile Germany
Posts: 26
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

thanks for the answer. I added

protected boolean navigationMovement(int dx,int dy, int status, int time)

to the MainScreen class and it seems to be working - for all fields. Is it possible to override navigationMovement only for the one ObjectListField?

Second question: do I have to call super() in order to execute code of the original navigationMovement? If yes, how? Sorry, today is my first try to code in Java - might be a stupid question.

Thanks!
Offline  
Old 09-17-2009, 05:09 PM   #4 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

From the Javadocs for the Field class (which is the base class for all fields):

navigationMovement
protected boolean navigationMovement(int dx,
int dy,
int status,
int time)Invoked when a navigational motion occurs.
Offline  
Old 09-18-2009, 04:36 AM   #5 (permalink)
Knows Where the Search Button Is
 
Join Date: Mar 2005
Model: 8100
Carrier: T-Mobile Germany
Posts: 26
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks!
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.