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
New Contributor
Posts: 2
Registered: ‎12-14-2011
My Device: BOLD9700
My Carrier: AT&T Mobility

How To Disable PopUp menu on TORCH

[ Edited ]

Hi, need help. there is one layout manager on screen and no fields. when i tap (quickly) on screen - appear a popup menu. how can i disable it? This is my processing of touchEvent:



switch (event.getEvent()) {

case TouchEvent.CANCEL:
return super.touchEvent(event);

case TouchEvent.MOVE:

  blah-blah-blah

return super.touchEvent(event);


case TouchEvent.DOWN:
blah-blah-blah
   return true;


case TouchEvent.UP:

blah-blah-blah

break;


case TouchEvent.CLICK:
return super.touchEvent(event);

default:
break;
}

Thank you for attention.

Developer
Posts: 409
Registered: ‎06-03-2010
My Device: Z10 Red
My Carrier: Free

Re: How To Disable PopUp menu on TORCH

Hi dgek! Nice to see I'm not alone with this trouble. You'll event find a similar isue on OS 7 device, but when the user click with the trackpad and not the touchscreen!

 

For Torch OS6 problem:

 Override the navigationUnclick of the Field that cause trouble without calling super, and return true. If that doesn't work, do it to it's manager, etc to its screen. Beware! The standard Button fire the event on unclick, so check if the Leaf Focused Field (with getLeefFieldWithFocus() ) is an instance of your Field that cause trouble, and if so do not call super.navigationUnclick();

 

For OS7 problem 

A pop-up menu is displayed if a new screen is pushed when we click a custom button. I only resolved the problem with a crapy crapy way: When unclick is fired, I save the current Time. On the getMenu() of the new screen,  I return null if the unclick was fired for less than 2-3 seconds.

 

 

New Contributor
Posts: 2
Registered: ‎12-14-2011
My Device: BOLD9700
My Carrier: AT&T Mobility

Re: How To Disable PopUp menu on TORCH

Thanks=)
Oh yes, this problem appear not only torch devices... Devices with os6 and os7 (nontouch) give this trouble too=)

But I override nav.click and unclick with return true, but it doesnt  work for nontouch (with touch devices this trouble disappear). 
What do you mean, when writed "...do it to it's manager, etc to its screen."?

Developer
Posts: 409
Registered: ‎06-03-2010
My Device: Z10 Red
My Carrier: Free

Re: How To Disable PopUp menu on TORCH

I never had such trouble with non touch screen, so I could not help you. Once I have seen something like that on non-touch: when a pushscreen should generate an exception (IllegalArgumentException or other), it displays the pop-up menu instead.

 

What I meaned is: Ovveride navigationUnclick of the manager containing the Field that cause the problem.