Blackberry storm touchEvents

Ive ported the Blackberry 4.6.0 app to the storm at 4.7.0. Everything works fine except for the touch events that I am trying to control. I delay touch events in the method below, which does as intended, but the problem after my logic in touchEvent executes and returns the menu (which is activated using the menu button) is always displayed. I tried to return false, true and super.touchEvent (message), but it still appears.

Any ideas on how I can prevent the Menu from appearing after capturing a touch event?

protected boolean touchEvent(TouchEvent message)
{
     if (message.getEvent() == TouchEvent.CLICK)
     {
        //My code here
     }
}

Your thoughts are greatly appreciated.

+3
source share
2 answers

Just to clarify haagmm's answer:

, TouchEvent.CLICK , navigationClick. , , ButtonFields, , touchEvents.

navigationClick ( true) , .

, , ButtonFields click. , ButtonFields :

ButtonField myButtonField = 
    new ButtonField( ButtonField.CONSUME_CLICK | ButtonField.NEVER_DIRTY );

haagmm code - , TouchEvent.CLICK, navigationClick. , , BlackBerry Tour, - .

+6

"" , , , 4.6.

- , touchEvent :

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

Source: https://habr.com/ru/post/1708172/


All Articles