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
Developer
Svat_
Posts: 85
Registered: ‎02-13-2009
My Device: 9860
My Carrier: MTS
Accepted Solution

Advanced UI question

Hi!

I need to make UI for my application like a Blackberry application menu. I want to show 9 buttons on the screen (3  rows a 3 columns). Like that:

[1]   [2]   [3] 

[4]   [5]   [6] 

[7]   [8]   [9]  

 I made it this way : I had add 3 HorizontalFieldManagers to screen and each of them has 3 buttons. Now it looks like as I need, but I have issue with fucus moving. If I test it on device with trackwhil, it works fine. But On devices with trackpad it not works as I need. For example, if I have selected button [7] and press UP, then focus move to button [6]. But I need to move focus to button [4]. 

Perhaps it is not best solution... Does any body have the same interface? How to do it worked properly?

Thanks! 

Please use plain text.
Developer
simon_hain
Posts: 16,010
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: Advanced UI question

overwrite moveFocus and implement your own focus movement
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Developer
arkadyz
Posts: 2,268
Registered: ‎07-08-2009
My Device: various
My Carrier: various

Re: Advanced UI question

You might want to use GridFieldManager (or TableLayoutManager for OS < 5.0) instead of your collection of HorizontalFieldManagers. I'm pretty sure they work with touchpad the way you need. Never tried or heard anything about their functionality with trackwheel, though.

----------------------------------------------------------
please click 'Accept Solution' on posts that provide the solution to the question you've posted. Don't say "Thanks", press 'Like' button instead!
Please use plain text.
Developer
alishaik786
Posts: 285
Registered: ‎08-26-2011
My Device: 9900
My Carrier: Not Specified

Re: Advanced UI question

[ Edited ]

Why don't you take GridFieldManager;

Look this link which is posted by me:

 

http://208.74.204.192/t5/Java-Development/GridFieldManager/m-p/1291533#M172802

 

On there: you write like this:

 

grd.add(new LabelField("[1]")); 

 

or

 

grd.add(new LabelField("["+i+"]"));//Here " i " is integer value;

 ========================================================================================

Feel free to click THUMB symbol.

=================================================================================
Feel free to click LIKE button if the solution helps you;
--
Regards,

ALI SHAIK.
Please use plain text.
Developer
Svat_
Posts: 85
Registered: ‎02-13-2009
My Device: 9860
My Carrier: MTS

Re: Advanced UI question

Thanks a lot! I will try it today!

Please use plain text.
Developer
alishaik786
Posts: 285
Registered: ‎08-26-2011
My Device: 9900
My Carrier: Not Specified

Re: Advanced UI question

If you get solution
========================================================================================
Feel free to click THUMB symbol.
=================================================================================
Feel free to click LIKE button if the solution helps you;
--
Regards,

ALI SHAIK.
Please use plain text.