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
Contributor
Posts: 30
Registered: ‎03-24-2011
My Device: 9800
My Carrier: sfr
Accepted Solution

How to disable the menu in the middle of the screen ?

Hello everybody !

 

Here is my question.

 

I am creating a cutom screen with some ButtonField, overriding MainScreen, and implementing FieldChangeListener.

 

In this screen I have some menu items which are set using the this.addMenuItem method.

 

I am listening the event on the buttons implementing the fieldChanged(Field field, int context) method.

 

When I click one of my buttons, the specific action is invoked properly but the menu items are also displayed in the middle of the screen (in the specific middle menu display of the 9800).

 

How can I disable it ?

 

Thanks in advance.

Highlighted
Developer
Posts: 2,268
Registered: ‎07-08-2009
My Device: various
My Carrier: various

Re: How to disable the menu in the middle of the screen ?

Create your ButtonFields with ButtonField.CONSUME_CLICK style bit. Also consider adding ButtonField.NEVER_DIRTY (not for this problem, but a good idea anyway).

----------------------------------------------------------
please click 'Accept Solution' on posts that provide the solution to the question you've posted. Don't say "Thanks", press 'Like' button instead!