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

Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.

New Developer
Posts: 6
Registered: ‎09-05-2009
My Device: Not Specified

How to create this layout?



I want to start my post mentioning that I am really new to Java, I´m a webdeveloper, so the idea of Java applications is really confusing for me, I'm learning, and manage to create an small app, that barely works so far Smiley Tongue


Basically i am trying to something like this:



I need to add as many items (images) to the menu as possible, so i need to scroll to the sides, and the center icon will be a little bigger than the rest, something like the Mac OS X Dock,but not as fancy as it, also, below of each image, there will be an small text label.


Each item will take you to a new screen that will load a normal form, or a RSS reader, i am basing my work on this article by IBM:



But i am totally lost with the menu, so any guide, tutorial, or hopefully sample code will save my Sunday Smiley Happy


Thanks a lot for your help guys!



Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: How to create this layout?

I would start with a HorizontalFieldManager to contain the icons. The manager should have horizontal scroll enabled.


The icons should be clickable-focusable BitMapFields. You can set the "normal" image in all fields, then switch the the larger "focus" image in the focused field.




Posts: 1,415
Registered: ‎07-30-2008
My Device: Not Specified

Re: How to create this layout?

There are at least two approaches but first try google confined to blackberry.com for their online dev guides.

You can use the screen,manager, and field and try to put everything together  but it takes a while to find the best

options for each and what you need to customize- I rendered all the javadocs

htmls so I can search it with normal text processing tools ( grep for "field" for example) to find all the classes

that may be relevant. This is good of course to get platform look and feel as much as possible and use

the existing support facilities. 


Alternatively, if you want to insure that your UI looks the same everywhere regardless of how the phone is themed

or otherwise customized, or you anticipate having various overlays that may be difficult to explain to a manager, 

you can just use one large bitmap for your screen and draw stuff where ever you like.

In this case, you just need to get key and navigation actions and move your internal stuff like cursor or focus under 

your own algorithm. The UI components have methods of all of this.  A lot of people seem to have problems with the mangers and

getting the layout as desired, I'm not sure writing your own screen with a list of images and text is really much easier,

versatile, or quicker to learn but it may be an option. This may also mean you have to code something in java that may exist

as faster optimized native code in the existing framework etc.