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
songdawg
Posts: 59
Registered: ‎06-08-2011
My Device: n/a
My Carrier: n/a
Accepted Solution

Application Navigation - Best way to implement top right "Menu"

Hello,

 

I am building a Blackberry application which has the following requirement. I need to create a "menu" button in the top right of my screens that when clicked opens a list of items which when clicked would open a screen). When the "menu" button is clicked again the list of buttons disappears. Kind of like the Blackberry menu but launched from a button attached to the top right of the screen. King of hard to describe so please let me know if you would like more clarification.

 

I have been reviewing what components are available and trying to figure out the best approach. I am thinking of using a list style button field (http://docs.blackberry.com/ja-jp/developers/deliverables/29251/Creating_a_list_style_button_field_16...).

 

Any suggestions on a better way to approach it?

 

Thanks in advance! 

Please use plain text.
Developer
peter_strange
Posts: 19,599
Registered: ‎07-14-2008
My Device: Not Specified

Re: Application Navigation - Best way to implement top right "Menu"

[ Edited ]

Welcome!

 

You basically need a button, and ListStyleButton is fine, then you need a small screen to display it, which will be a PopupScreen.  Get that working, then we can talk about positioning the PopupScreen. 

 

The ListStyleButton appears to be an OS 7.0 Field, but you will find something very similar in here:

http://supportforums.blackberry.com/t5/Java-Development/Implement-advanced-buttons-fields-and-manage...

that you use in older levels.

Please use plain text.
Developer
songdawg
Posts: 59
Registered: ‎06-08-2011
My Device: n/a
My Carrier: n/a

Re: Application Navigation - Best way to implement top right "Menu"

Thanks for the very quick reply Peter. 

 

That helps narrow it down for me and I will give that a try. For the positioning I am assuming there must be some way to set the popup screen coordinates as well as the width and height.

 

Thanks!

Please use plain text.
Developer
peter_strange
Posts: 19,599
Registered: ‎07-14-2008
My Device: Not Specified

Re: Application Navigation - Best way to implement top right "Menu"

You properly won't want to set the width and height.  This will depend on the contents, but yes you could.  you will want to find out how big it has made itself, and then use that and setPosition. 

 

I'm not that great on this, so I'm hoping that someone who is better will step in at that stage. 

Please use plain text.
Developer
songdawg
Posts: 59
Registered: ‎06-08-2011
My Device: n/a
My Carrier: n/a

Re: Application Navigation - Best way to implement top right "Menu"

Thanks Peter. I appreciate the help - setPosition works.

Please use plain text.