BlackBerry Forums Support Community

BlackBerry Forums Support Community (http://www.blackberryforums.com/)
-   Developer Forum (http://www.blackberryforums.com/developer-forum/)
-   -   Prevent horizontal manager from up/down based navigation (http://www.blackberryforums.com/developer-forum/213617-prevent-horizontal-manager-up-down-based-navigation.html)

mahdi 12-13-2009 02:36 AM

Prevent horizontal manager from up/down based navigation
 
Hello All,

I have horizontal manager which has two lists. My problem is when you scroll down and hit the last item of the left list the manager move the focus to the right list. I need to stop this navigation and let the left/right trackball navigation only.

kelumkps 12-18-2009 04:28 AM

Add another focuable field (but not visible to user) such as a LabelField with empty string to the bottom of the first list. Then each time it is focused after the last item of your first list, set focus to that item.

mahdi 12-20-2009 07:22 AM

Thanks for your help, I 've found clean way to do it by overriding navigationMovement method inside the ListField:

protected boolean navigationMovement(int dx, int dy, int status, int time) {
if( getSelectedIndex() + dy >= getSize() ) {
return true;

}

return super.navigationMovement(dx, dy, status, time);

}


All times are GMT -5. The time now is 06:50 PM.

Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.