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
Regular Contributor
Posts: 97
Registered: ‎07-12-2011
My Device: curve 8900

blackberry focus..

i have 10 button in vertical field manager.. i added that one top of the screen.. i add another manager in bottom side.. i that i am adding some field like textbox field, label field.. i click the first button... then i m trying bottom side field.. but it focusing all 10 buttons.. then only coming to bottom manager.. i want if i focus field button then i click to downward it want to come down dont want to focus all 9 buttons.. how can i do that.. help me pls 

Super Contributor
Posts: 278
Registered: ‎11-04-2010
My Device: 4.5 and above

Re: blackberry focus..

Hi,

   If the fields are focusable then focus pass through each field.

 

But if U want to jump, then override

navigationMovement  so that after first field focus if we click down then jump to last button.

 

otherwise u can also made those nine buttons not to focus by giving style as NON_FOCUSABLE.

 

Thanks & Regards

               pp

Regular Contributor
Posts: 97
Registered: ‎07-12-2011
My Device: curve 8900

Re: blackberry focus..

thanks for reply.. that 10 button are not different button field.. its same button field.. i creating that button field dynamically.. if i click the first button it want to jump to last field.. i my screen i have 3 managers.. in top manger i adding some buttons dynamically. in bottom manager i have one textbox field and one button.. if i type in text box and click button.. it ll create button in middle manager.. if send many msg.. in middle manager many button ll create.. and also i want to focus the last button middle manager.. when i click the buttons of top manager the focus want to come to bottom manager not a middle manager.. how can i do that.. its like chat application.. help me
Super Contributor
Posts: 278
Registered: ‎11-04-2010
My Device: 4.5 and above

Re: blackberry focus..

Hi,
override navigationMovement for each manager
mainScreen
(0) : top manager -- when u click do something like this
ButtonField focusButtom = (ButtonField)mainScreen.getManager(2).getField(0) // get the button of bottom manager and use for loop to get last button.
focusButtom .setFocus();
(1) : middle manager --
(2) : bottom manager --
same for this too.

Thanks & Regards
pp
Regular Contributor
Posts: 97
Registered: ‎07-12-2011
My Device: curve 8900

Re: blackberry focus..

thanks for reply.. i have one more doubt.. i that 10 button.. i set field change listener.. when click 5 button.. field ll be changing fine.. but again i ll come down.. directly that 5 button not focusing.. the focus coming through 1,2,3. like this.. help me
Super Contributor
Posts: 278
Registered: ‎11-04-2010
My Device: 4.5 and above

Re: blackberry focus..

Hi,

   There is not even a picture and you have added buttons to topmanager then to bottommanager and based on first button clcik you are adding buttons to middle manager dynamically.

Where is 5th button and where is button 1, 2, 3.. I am really confused.

 

its ok.. what ever u want u can control in navigationMovement method of respectivw manager or of mainScreen.

 

when you change the field, again you can setFocus the required button on FieldChangeListener method only just as before.

 

Thanks & Regards

              pp 

Regular Contributor
Posts: 97
Registered: ‎07-12-2011
My Device: curve 8900

Re: blackberry focus..

Thanks for reply.. actually problem is u saw twitter application in blackberry devices.. in that home screen some 8 buttons is there.. if click the 1st button the some items ll display.. then u click 5th button it ll display some items.. in navigation movement the focus ll go the displayed items.. again u come upward.. which button clicked that button ll focus.. then it go other buttons.. like that i creating screen.. my problem is navigation.. i dont know i want to handle that.. im using 3 managers.. in last manager i have buttons.. in middle manager i have text box and send button like twitter.. in top manager im displaying the msgs like tweets.. in which manager i want to handle that navigation. or i want to handle that in screen..pls give some example code..
Super Contributor
Posts: 278
Registered: ‎11-04-2010
My Device: 4.5 and above

Re: blackberry focus..

Hi,

     if click the 1st button the some items ll display.. then u click 5th button it ll display some items.. in navigation movement the focus ll go the displayed items..

 

when u click 1st button then the items ll display.. those items may be labelfield or button field give the style parameter as NON_FOCUSABLE. so that focus jumps to only those home screens's 8 items.

 

otherwise

 can u paste your code

 

Thanks & Regards

              pp

        

Regular Contributor
Posts: 97
Registered: ‎07-12-2011
My Device: curve 8900

Re: blackberry focus..

in that 8 items.. i click one particular button know for that button some items ll display.. so focus go to that items.. again go back means which button i click only want to focus not other buttons
Super Contributor
Posts: 278
Registered: ‎11-04-2010
My Device: 4.5 and above

Re: blackberry focus..

Hi,

 

   Check this thread..

http://supportforums.blackberry.com/t5/Java-Development/Horizontal-Scrolling-in-AbsoluteFieldManager...

 

override nextFocus()

it might be helpful.

 

Thanks & Regards

              pp