MusiGenesis
MusiGenesis

Reputation: 75296

BlackBerry: how to override makeMenu() and cancel (so that no menu appears at all)?

In my screen class, I can override makeMenu and use it to do something, like this:

protected void makeMenu(Menu menu, int instance) {
   reDraw();
}

However, when I click the trackball reDraw(); is called (like I want), but then a menu still pops up (with Call Voice Mail and Switch Application options).

How can I cancel this menu entirely here? I want to use the click of the trackwheel purely as a simple click event, without a menu popping up.

Upvotes: 0

Views: 682

Answers (1)

MusiGenesis
MusiGenesis

Reputation: 75296

You can do this by not overriding makeMenu:

protected boolean navigationClick(int status, int time) {
    reDraw();
    return true;
}

Upvotes: 4

Related Questions