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


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.


Reply
Developer
Posts: 1,006
Registered: ‎05-22-2009
My Device: Not Specified
Accepted Solution

How to remove menus from the Global menu

[ Edited ]

Hi Guys,I want to know how can  i remove the switch application menu  which is available globally.

 

I found out   ApplicationMenuItemRepository.getInstance().removeMenuItem(id, item)

 

I want to know how to retrieve id and item for the switchapplication menu  ,as well as some  other menu.

 

 

Is it Possible?

 

Regards

 

Rakesh Shankar.P

Developer
Posts: 92
Registered: ‎01-15-2009
My Device: Blackberry 9550

Re: How to remove menus from the Global menu

Hi. Try to use this code

 

public class My_Screen extends MainScreen

{

 

    public My_Screen()
    {

       super(DEFAULT_CLOSE | NO_SYSTEM_MENU_ITEMS);

    }

}

 

Regards, Dmitry.

 

 

Developer
Posts: 1,006
Registered: ‎05-22-2009
My Device: Not Specified

Re: How to remove menus from the Global menu

Thanks I will use it,Incase if i want to remove the menus that are outside the application such as Move ,Hide etc,Is it Possible?

 

 

thanks

 

Rakesh Shankar.P

Developer
Posts: 17,026
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: How to remove menus from the Global menu

the remove method works only for items you added yourself. you cannot influence items added by other applications (or the OS).

----------------------------------------------------------
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
Developer
Posts: 1,006
Registered: ‎05-22-2009
My Device: Not Specified

Re: How to remove menus from the Global menu

Thanks Simon ,and Dimitry when i add super(DEFAULT_CLOSE | NO_SYSTEM_MENU_ITEMS);  to my main screen,it shows error.Especially with "NO_SYSTEM_MENU_ITEMS",Is there anything to be imported?

 

Regards

 

Rakesh shankar.P

 

 

Developer
Posts: 17,026
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: How to remove menus from the Global menu

NO_SYSTEM_MENU_ITEMS is supported from 4.7 on, maybe your project is on another OS level? you can use the value of it, then.

----------------------------------------------------------
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
Developer
Posts: 1,006
Registered: ‎05-22-2009
My Device: Not Specified

Re: How to remove menus from the Global menu

Still the same problem persists,i dont know whether it may be due to the usuage of  Simulator which of 5.0 Only,

 

I tested in the simulators of   5.0.0.252 (9500)\4.7.0.75 (9530-Verizon).It shows the same error only.

Highlighted
Developer
Posts: 92
Registered: ‎01-15-2009
My Device: Blackberry 9550

Re: How to remove menus from the Global menu

Try to build your project with RIM component pack 5.0.

 

Regards, Dmitry.