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
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: 16,992
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: 16,992
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.