6.0 touch event propagation problem

I was wondering if anyone has seen this behavior:

When you tap the radio button on the torch, the radio button actually called navigationClick method as well as the touchEvent reminder screens...   This navigation click returns with status equal to 0.

Only occurs on RadioButtonField, all other fields correctly call touchEvent only when they are hit.

Wonder why screens/field navigationClick method would be called on a single touchscreen device.

Dnepr wrote:

Looks good, if I manually using the touchEvent turning true that he will not call navigationClick.

If the field does NOT consume the event, it calls navigationClick.

Interesting!

In fact, it is very intuitive - if I use TouchEvent.CLICK, I wait for the rest of the framework simply accept that and jump any further processing, including conversion to navigationClick().  If I have not (return false) or if I delegate the rest of the processing to the framework (super.touchEvent (message)), I expect to continue its default processing of return.

I hate a lot of things on the behavior of BlackBerry, but this bit is OK in my book

Tags: BlackBerry Developers

Similar Questions

  • Are the touch events in new broken ripple?

    Hello

    I have a PlayBook application that uses touch events to shake things. I tested it in the stand-alone version of ripple and the physical device.

    Now I think on porting the app to BB10, so I downloaded the verion of ripple Chrome and I found that in the waving of the new, I can't move any object!

    I've identified the problem, but I don't know how to cope. Here is a small HTML file that shows the problem:

    http://www.w3.org/1999/xhtml">
    
    
    
        
    child

    So basically there is a div container that listenes to the touchstart and if this event happens that it displays an alert. In the ripple of old (and on the PlayBook device) If you press the 'child' div the alert is also shown (the event is pushed down and intercepted by containers). In the waving again, it happens.

    Any suggestions? I can force ripple action as does the Playbook? Maybe I should use another technique to capture touch events?

    Hi razorek,

    I'm not sure of the reason (his behavior of WebKit), but the propagation of the event using the AddEventListener method will allow when you use touchstart. Take a look:

    http://www.w3.org/1999/xhtml">
    
    
    
        
    child

    Also, when using ripple for Chrome, please make sure that "Emulate touch events" are not verified, since ripple there are tactile own emulation system and it may come into conflict with it.

    F12 (Open Developer Tools) > click on the gear icon in the lower right > Exceptions tab > emulate the Touch events. I'll also post this work around for that matter https://github.com/blackberry/Ripple-UI/issues/344 github page

  • dominant touch event handler replaces all other fields

    I have the code following, which uses gestures to perform scrolling on my hfm, but substitution of this hfm, replace essentially all fields on the screen, making them useless. How is this possible, I thought that this specific touchEvent belonged to the hfm? How to work around this problem and just disable scroll for the hfm?

    gallery = new CustomHFM(){
    
                protected void sublayout(int maxWidth, int maxHeight){
                    super.sublayout(maxWidth, 200);
                    setExtent(maxWidth,200);
                }
    
                protected boolean touchEvent(TouchEvent message){
    
                    int eventCode = message.getEvent();
    
                    if(eventCode == TouchEvent.GESTURE){
                        System.out.println("SWIPE GESTURE");
                        TouchGesture g = message.getGesture();
                        int gesturecode = g.getEvent();
                        int direction = g.getSwipeDirection();
    
                            //gallery.setHorizontalScroll(page_two, true);
                        if(direction == TouchGesture.SWIPE_WEST)
                            slideNext();
    
                        if(direction == TouchGesture.SWIPE_EAST)
                            slidePrev();
    
                        pressed = true;
                    }
    
                    if(eventCode == TouchEvent.UP){
                    pressed = false;
    
                    //slide();
                    }
    
                    return true;
                }
            };
    

    I want to just do not use the default scroll and do my own thing! Any suggestion would be appreciated, I'm really in the fire right now.

    OK, this is a different problem.  I suspect that you must reject touch events that are not actually within your HFM.  Then add code like the following at the beginning of your touchEvent method:

    int x = message.getX (1);
    int y = message.getY (1);
    If (x < 0="" ||="" y=""> < 0="" ||="" x=""> getExtent () .width: y > getExtent () .height) {}
    Outside the scope
    Returns false;
    }

    If this is not enough, so be sure that your touchEvent method is called.  If it really is, then I think you have a problem with a Manager.  You have all Directors complicated on your screen.  Try to simplify the screen so that you don't use native components RIM (and nothing implying positioning as AbsoluteFieldmanager and see if the problem persists.)  If so, then see if you can post an example of the sample that shows the problem so that we can all try.

  • Parents and children Touch - event management

    I have a container with some controls.

    I want this is notecard to the container code to run only if no child control has handled the event onTouch.

    Is this possible?

    Thank you

    Jamie

    I solved it.

    Here's how...

    First of all, there are two touch events, I have now, I understand as follows:

    'touchCapture' is received in a container before the spread of children take place.

    'touch' is received in a container after the propagation takes place.

    I've added a property to the container like this:

    Boolean touchHandled property

    I added handlers for the touchCapture and the touch, like this:

    onTouchCapture: {}
    touchHandled = false
    }

    Notecard: {}
    If (! touchHandled) {}
    Manage you like...
    }
    }

    If a child control manages the key event, I the child touchHandled set to true. For example, in one of the children, I manage a TOP event. I have code like this (in children):

    Notecard: {}
    If (event.isUp ()) {}
    Do all that...

    touchHandled = true
    }
    }

    Mission accomplished. Comments are welcome...

    Jamie

  • Touch event works outside the buttons

    Hello

    I'm developng a touch phone application and type. Now on a single screen of the application, there are 3 buttons. Is the screenshot below:

    Here if I touch three-button, it works. But if I touch outside the buttons, we hear in the bar at the top or in the bottom bar, then touch event also works. Suppose that in the bottom, add more button is focused. So if I touch on the lower bar, then also touch button works correctly. To resolve this problem, I wrote the code below:

    try {
                int touchXPos = event.getX(1);
                int touchYPos = event.getY(1);
                int addBtnXPos = btnAddMore.getLeft();
                int saveBtnXPos = btnSave.getLeft();
                int helpBtnXpos = btnHelp.getLeft();
    
                int vfmTitleTouch = m_vfmTitle.getHeight();
    
    if ((touchXPos >= addBtnXPos + 40) && (touchXPos <= (addBtnXPos + btnAddMore.getWidth() + 40)) && (touchYPos <= screenHeight -10) && (touchYPos >= (screenHeight -10 - btnAddMore.getHeight()))  /*&& (touchYPos < (screenHeight-gmYPos)) */)
                {
                    Logger.out("touchEvent", "------------------------------1");
                    showPopUp();
                    return true;
                }
    
                else if ((touchXPos >= saveBtnXPos + 40) && (touchXPos <= (saveBtnXPos + 40 + btnSave.getWidth())) && (touchYPos <= screenHeight -10) && (touchYPos >= (screenHeight -10 - btnSave.getHeight()))/* && (touchYPos < (screenHeight-gmYPos))*/ )
                {
                    Logger.out("touchEvent", "------------------------------2");
                    saveToDb();
                    return true;
                }
    
                else if ((touchXPos >= helpBtnXpos) && (touchXPos <= (helpBtnXpos + btnHelp.getWidth())) && (touchYPos <= (btnHelp.getTop() + btnHelp.getHeight())) && (touchYPos >= btnHelp.getTop())/* && (touchYPos < (screenHeight-gmYPos))*/ )
                {
                    Logger.out("touchEvent", "------------------------------3");
                    UiApplication.getUiApplication().pushScreen(new HelpScreen());
                    return true;
                }
                else if ((touchYPos <= screenHeight - hfmBtn.getHeight()) && (touchYPos >= (vfmTitleTouch)))
                {
                    Logger.out("touchEvent", "------------------------------4");
    //              Logger.out("touchEvent", "touchY::::" +touchYPos  + "Vfm Title::::" +vfmTitleTouch  + "  "+"GM Y Pos"+  gmYPos);
                    return true;
                }
                else
                {
                    Logger.out("touchEvent", "------------------------------5");
                    return false;
                }
            }
            catch (Exception e)
            {
            }
    
            return super.touchEvent(event);
        }
    

    But it does not work... Can someone help me?

    And touch event should work in the middle of the screen as for the boxes also...

    Thank you...

    I tried this way... But it does not work. The same problem. Touch outside of the button, it works to the functionality of the button.

  • Touch event of overlay question

    For our articles, we use an overlay to simulate a background image with "background-attachment: fixed" property css on mobile devices. This overlay 'pointer-events' set to none, then it does not interact with touch events.

    However scrolling is barely on the DPS Android app. It scrolls only in small steps. It works fine when loading the article Chrome (Android).

    There is also no question about the IOS version of the DPS app.

    Here is an example article reproduce the problem:

    Dropbox - Overlay_Issue.zip

    Any idea what's going on?

    Hello Sander,

    Thanks for sharing a nice, clean, the HTML file that reproduces the issue. I get the question on my camera as well. I logged a bug against the Android Viewer to investigate on what is happening.

    Neil

  • Touch events in Cascades/QML

    Hello everyone

    I'm "new" in this kind of things of Cascades and a lot is different from that of QtQuick on Symbian, that's why I have one, well two small questions:

    (1) how can I manage touch events. For example I want to design an element as a button, but without using the predefined one. Basically, it's a container with color and a label in it. And I want to give a basic animation, I'm searching for equal to onPressed and onReleased, two methods to change the background color, when the user presses the button and make it back to the default color, when it releases.

    (2) is there any kind of Qt Assistant for Cascades? I couldn't find the reference to assistance in line/API here, but it is so messed up my opinion and lack features such as research. In the best cases, this documentation is fully downloadable and usable offline.

    Hopefully, you can help me...

    Best regards

    Sebastian

    I worked today on a similar question. You can query the key like this event type:

    onTouch: {
        if (event.touchType == TouchType.Down) {
          //doStuff
        }
    }
    

    I used this to make a whole one button container, regardless of its content.

  • OpenGL + MMR video playback and touch events.

    Hello BB forums natively,.

    We have an openGL application that renders the video using the window mmrenderer child. Surface OpenGL is transparent and makes some elements of overlay the video above. It seems that the touch events are only sent when it arrives on the non-transparent part of the surface of the OpenGL. Is there a way to catch all touch events in this scenario (perhaps of the child window)?

    Thank you!

    Ask yourself properly the events with "screen_request_events..." with the context of the correct screen?

    Did you look in the GoodCitizen OpenGL sample application? It shows how all the events are received and process across the entire screen with a very similar use case;

    Martin

  • How to manage touch event in the field

    Hello

    I created field checkbox custom, when am touch event for her manipulation, emphasis is gettting inside, and when I try to click on any other components such as the box native, afer by unchecking the custom check box, the custom box is clicking again.

    How to handle this?

    Thank you

    Rakesh Shankar

    There are certain basics that one needs to understand to effectively manage key events:

    (1) touch events are sent to the field currently has focus and the enveloping managers, including the active screen.

    (2) default response of the system to the event down is to divert attention to the field to the position of touch If there is a focusable it. If there is no focusable point touch field, the field currently has focus is unchanged. There's no "unfocus everything ' method in BlackBerry (there might be, but it is not readily available - there is a protected method focusRemove, but it is supposed to be used in conjunction with a later focusAdd protected in cases where the field has changed its focus rectangle - a classic example is any input field or text such as EditField or RichTextField view)

    (3) the default action of TouchEvent.CLICK is to call trackwheelClick (which, by default, invokes navigationClick) which is a great way to ensure consistency between the 'clicks' and clicks touchpad screen. The same is true for unclicks finally managed by navigationUnclick.

    If you want to disable the click by default if the key is outside all focusable fields and will not disrupt the rest of the system, just return true if the event is to CLICK, but the contact details are outside the scopeand actions super.touchEvent otherwise. And keep your return true; on all UNCLICK events: it's a good idea if you don't want to see the context menu from appearing each time or field click reaction called twice.

    The example of Peter was written when I've heard most of it already, but now I realize that you can do a lot easier. See part highlighted the previos section.

    Good luck!

  • A touch event image resizing

    Hi I want to resize an image in touch event if the user stretch the image should increase the size of the image and reduces the image should reduce the size of the image, is it possible thanks in advance

    It is, and this example should help you:

    Rotate and scale of bitmaps

    http://supportforums.BlackBerry.com/T5/Java-development/rotate-and-scale-bitmaps/Ta-p/492524

  • stimulate the touch event handling in PRC?

    I want to stimulate the touch event in another application. can someone help me in explaining to me with a code example.

    I'll pass on this one, whenever I give you an answer to a topic, change you what you wanted in the first place.
    First of all, you wanted to listen to the event:
    http://supportforums.BlackBerry.com/T5/native-development/touch-does-not-fire-for-Q10/TD-p/3026980

    Second, you were finally made in the PRC:
    http://supportforums.BlackBerry.com/T5/native-development/touch-event-handling-in-CPP/TD-p/3027043

    Third, you asked to simulate a key event in this thread I made.

    Now, this isn't what you want, you want to simulate a click on a button.

    I'll let someone else answer that one.

  • iLLEGALARGUMENT EXception on touch event

    package mypackage;
    
    import java.util.Vector;
    
    import net.rim.device.api.system.Display;
    import net.rim.device.api.ui.Field;
    import net.rim.device.api.ui.FocusChangeListener;
    import net.rim.device.api.ui.Font;
    import net.rim.device.api.ui.Graphics;
    import net.rim.device.api.ui.Manager;
    import net.rim.device.api.ui.TouchEvent;
    import net.rim.device.api.ui.TouchGesture;
    import net.rim.device.api.ui.UiApplication;
    import net.rim.device.api.ui.XYRect;
    import net.rim.device.api.ui.component.BasicEditField;
    import net.rim.device.api.ui.component.ButtonField;
    import net.rim.device.api.ui.component.LabelField;
    import net.rim.device.api.ui.component.SeparatorField;
    import net.rim.device.api.ui.component.Status;
    import net.rim.device.api.ui.container.HorizontalFieldManager;
    import net.rim.device.api.ui.container.MainScreen;
    import net.rim.device.api.ui.container.VerticalFieldManager;
    
    public class PlaylistTab extends MainScreen  implements FocusChangeListener{
    
        private int _xCoord = 0; //The x coordinate for the top left corner of the image.
        private int _yCoord = 0; //The y coordinate for the top left corner of the image.
        private int _xTouch = 0; //The x coordinate of the previous touch point.
        private int _yTouch = 0; //The y coordinate of the previous touch point.
    
        private LabelField tab1;
    
        private LabelField tab2;
    
        private LabelField tab3;
    
        private LabelField spacer1;
    
        private LabelField spacer2;
    
        private VerticalFieldManager tabArea;
    
        private LabelField tab1Heading;
    
        private BasicEditField tab1Field1;
    
        private BasicEditField tab1Field2;
    
        private LabelField tab2Heading;
    
        private BasicEditField tab2Field1;
    
        private BasicEditField tab2Field2;
    
        private LabelField tab3Heading;
    
        private BasicEditField tab3Field1;
    
        private BasicEditField tab3Field2;
    
        private VerticalFieldManager tab1Manager;
        private VerticalFieldManager tab2Manager;
        private VerticalFieldManager tab3Manager;
        int tabNum = 1;
        public PlaylistTab()
        {
            super(NO_VERTICAL_SCROLL | NO_VERTICAL_SCROLLBAR);
            //HorizontalFieldManager hManager = new HorizontalFieldManager();
            HorizontalFieldManager hManager = new HorizontalFieldManager(NO_VERTICAL_SCROLL | NO_VERTICAL_SCROLLBAR | NO_HORIZONTAL_SCROLL  | NO_HORIZONTAL_SCROLLBAR);
            Font font = getFont().derive(Font.PLAIN, 35);
            tab1 = new LabelField("Songs", LabelField.FOCUSABLE | LabelField.HIGHLIGHT_SELECT)
            {
                protected boolean navigationClick(int status,int time){
    
                    return true;
                }
                protected void layout(int width, int height) {
                    super.layout(width, height);
                    //    this.setExtent(this.getWidth(), 60);
                    this.setMargin( ( getHeight() - this.getPreferredHeight()), 0, 0, (getWidth() - this.getPreferredWidth()));
                }
            };
            tab2 = new LabelField("Album", LabelField.FOCUSABLE | LabelField.HIGHLIGHT_SELECT)
            {
                protected boolean navigationClick(int status,int time){
    
                    return true;
                }
                protected void layout(int width, int height) {
                    super.layout(width, height);
                    //    this.setExtent(this.getWidth(), 60);
                    this.setMargin( ( getHeight() - this.getPreferredHeight()), 0, 0, (getWidth() - this.getPreferredWidth()));
                }
            };
            tab3 = new LabelField("Artist", LabelField.FOCUSABLE | LabelField.HIGHLIGHT_SELECT)
            {
                protected boolean navigationClick(int status,int time){
    
                    return true;
                }
                protected void layout(int width, int height) {
                    super.layout(width, height);
                    //    this.setExtent(this.getWidth(), 60);
                    this.setMargin( ( getHeight() - this.getPreferredHeight()), 0, 0, (getWidth() - this.getPreferredWidth()));
                }
            };
            spacer1 = new LabelField(" | ", LabelField.NON_FOCUSABLE);
            spacer2 = new LabelField(" | ", LabelField.NON_FOCUSABLE);
    
            tab1.setFocusListener(this);
            tab2.setFocusListener(this);
            tab3.setFocusListener(this);
            hManager.add(tab3);
            hManager.add(spacer1);
            hManager.add(tab2);
            hManager.add(spacer2);
            hManager.add(tab1);
    
            add(hManager);
            add(new SeparatorField());
    
            tab1Manager = new VerticalFieldManager(VERTICAL_SCROLL | VERTICAL_SCROLLBAR );
            tab2Manager = new VerticalFieldManager(VERTICAL_SCROLL | VERTICAL_SCROLLBAR );
            tab3Manager = new VerticalFieldManager(VERTICAL_SCROLL | VERTICAL_SCROLLBAR );
    
            tabArea = displayTab3();
            add(tabArea);
    
        }
        public void focusChanged(Field field, int eventType) {
            if (tabArea != null) {
                if (eventType == FOCUS_GAINED) {
                    if (field == tab1) {
                        System.out.println("Switch to Tab 1");
                        delete(tabArea);
                        tabArea = displayTab1();
                        add(tabArea);
                    } else if (field == tab2) {
                        System.out.println("Switch to Tab 2");
                        System.out.println("Switch to Tab 1");
                        delete(tabArea);
                        tabArea = displayTab2();
                        add(tabArea);
                    } else if (field == tab3) {
                        System.out.println("Switch to Tab 3");
                        System.out.println("Switch to Tab 1");
                        delete(tabArea);
                        tabArea = displayTab3();
                        add(tabArea);
                    }
                }
            }
    
        }
    
        public VerticalFieldManager displayTab1() {
            try
            {
                tabNum = 3;
                final VerticalFieldManager Content= new VerticalFieldManager(Manager.USE_ALL_WIDTH|Manager.VERTICAL_SCROLL);
                Content.setMargin(5,0,0,0);
                int mas  = 0 ;
                Vector oleg = new Vector();
                SQLManager poligs = new SQLManager();
                poligs.getSongDownload(oleg, 0);
                while(mas < oleg.size())
                {
                    Song temp = (Song) oleg.elementAt(mas);
                    Content.add(new A_Song(temp.songId, temp.songName, false,temp.albumCover,temp));
                    mas++;
                }
                tab1Manager.deleteAll();
    
                HorizontalFieldManager topManager = new HorizontalFieldManager()
                {
                    public void paint(Graphics graphics)
                    {
                        graphics.setBackgroundColor(0x00000000);
                        graphics.clear(); super.paint(graphics);
                    }
                    protected void sublayout( int maxWidth, int maxHeight )
                    {
                        int width = Display.getWidth();
                        int height = this.getPreferredHeight();
                        super.sublayout( width, height);
                        setExtent( width, height);
                    }
                };
                CustomTextBox editField = new CustomTextBox();
                int pol = Display.getWidth() / 2;
                editField.setWidth(pol);
                ButtonField button = new ButtonField("Search");
                topManager.add(editField);
                topManager.add(button);
    
                //  tab1Manager.add(topManager);
                tab1Manager.add(Content);
            }
            catch(final Exception e)
            {
    
                e.printStackTrace();
                System.out.println("------------------- ");
            }
            return tab1Manager;
        }
    
        public VerticalFieldManager displayTab2() {
            try
            {
                tabNum = 2;
                final VerticalFieldManager Content= new VerticalFieldManager(Manager.USE_ALL_WIDTH|Manager.VERTICAL_SCROLL);
                Content.setMargin(5,0,0,0);
                int mas  = 0 ;
                Vector oleg = new Vector();
                SQLManager poligs = new SQLManager();
                poligs.getSongDownloads(oleg, 0);
                while(mas < oleg.size())
                {
                    Albums temp = (Albums) oleg.elementAt(mas);
                    Content.add(new A_Album(temp.albumId, temp.albumName, false,temp.albumCover,temp));
                    mas++;
                }
                tab2Manager.deleteAll();
                tab2Manager.add(Content);
            }
            catch(final Exception e)
            {
    
                e.printStackTrace();
                System.out.println("------------------- ");
            }
            return tab2Manager;
        }
    
        public VerticalFieldManager displayTab3() {
            try
            {
                tabNum = 1;
                final VerticalFieldManager Content= new VerticalFieldManager(Manager.USE_ALL_WIDTH|Manager.VERTICAL_SCROLL);
                Content.setMargin(5,0,0,0);
                int mas  = 0 ;
                Vector oleg = new Vector();
                SQLManager poligs = new SQLManager();
                poligs.getSongDownloadss(oleg, 0);
                while(mas < oleg.size())
                {
                    Artist temp = (Artist) oleg.elementAt(mas);
                    //Content.add(new A_AddSingersFM(temp.songId, temp.songName, false,temp.albumCover,temp,-1, tb, logIn,logOut,1,0,0, Register));
                    Content.add(new A_Artisti(temp.artistId, temp.artistName, false,temp.artistPhoto,temp));
                    //  int m = temp.getSongId();
                    mas++;
                }
                tab3Manager.deleteAll();
                tab3Manager.add(Content);
            }
            catch(final Exception e)
            {
    
                e.printStackTrace();
                System.out.println("------------------- ");
            }
            return tab3Manager;
        }
        protected boolean touchEvent(TouchEvent touchEvent)
        {
            int eventCode = touchEvent.getEvent();
    
            if(eventCode == TouchEvent.GESTURE){
                System.out.println("SWIPE GESTURE");
                TouchGesture g = touchEvent.getGesture();
                int gesturecode = g.getEvent();
                int direction = g.getSwipeDirection();
    
                //gallery.setHorizontalScroll(page_two, true);
                if(direction == TouchGesture.SWIPE_WEST)
                {
    
                    if(tabNum == 3)
                    {
                        delete(tabArea);
                        tabArea = displayTab2();
                        add(tabArea);
                    }
                    else if(tabNum == 2)
                    {
                        delete(tabArea);
                        tabArea = displayTab3();
                        add(tabArea);
                    }
                }
    
                if(direction == TouchGesture.SWIPE_EAST)
                {
    
                    if(tabNum == 1)
                    {
                        try
                        {
                            delete(tabArea);
                        }
                        catch(Exception e)
                        {
                            try
                            {
                                tabArea = displayTab2();
                            }
                            catch(Exception ef)
                            {
                                add(tabArea);
                                return false;
                            }
                            add(tabArea);
                            return false;
                        }
                        try
                        {
                            tabArea = displayTab2();
                        }
                        catch(Exception ef)
                        {
                            add(tabArea);
                            return false;
                        }
                        add(tabArea);
                        return false;
    
                    }
                    else if(tabNum == 2)
                    {
                        try
                        {
                            delete(tabArea);
                        }
                        catch(Exception e)
                        {
                            try
                            {
                                tabArea = displayTab1();
                            }
                            catch(Exception ef)
                            {
                                add(tabArea);
                                return false;
                            }
                            add(tabArea);
                            return false;
                        }
                        try
                        {
                            tabArea = displayTab1();
                        }
                        catch(Exception ef)
                        {
                            add(tabArea);
                            return false;
                        }
                        add(tabArea);
                        return false;
                    }
                }
            }
            //The touch event was not consumed.
            return false;
        }
    }
    

    On the sidelines, East or West navigation events I illegalargument exception.and my page crashing.

    However, when I run the same code through the debugger it works fine. I put my debugging inside the touchevent ifs and elses togglepoints.

    And note, if it crashes and I click on an illegal argument exception... I go back to the home page and as if the touchevent function was called twice and 2 strips was skipped.

    It works fine but through debugger.any help?

    very strange, I did this and it worked

    protected boolean touchEvent(TouchEvent message)
        {
            try
            {
                int eventCode = message.getEvent();
    
                if(eventCode == TouchEvent.GESTURE){
                    System.out.println("SWIPE GESTURE");
                    TouchGesture g = message.getGesture();
                    int gesturecode = g.getEvent();
    
                    switch(gesturecode) {
    
                        case TouchGesture.SWIPE:
                            int direction = g.getSwipeDirection();
                        //gallery.setHorizontalScroll(page_two, true);
                        if(direction == TouchGesture.SWIPE_WEST)
                        {
    
                            if(tabNum == 3)
                            {
                            //  delete(tabArea);
                            //  tabArea = displayTab2();
                            //  add(tabArea);
                                tab2.setFocus();
                                return super.touchEvent(message);
                            }
                            else if(tabNum == 2)
                            {
                            //  delete(tabArea);
                            //  tabArea = displayTab3();
                            //  add(tabArea);
                                tab3.setFocus();
                                return super.touchEvent(message);
                            }
                        }
                        else if(direction == TouchGesture.SWIPE_EAST)
                        {
    
                            if(tabNum == 1)
                            {
    
                                        //delete(tabArea);
                                        //tabArea = displayTab2();
                                        //add(tabArea);
                                        tab2.setFocus();
                                        return super.touchEvent(message);
    
                            }
                            else if(tabNum == 2)
                            {
    
                                    //delete(tabArea);
                                    //tabArea = displayTab1();
                                    //add(tabArea);
                                    tab1.setFocus();
                                    return super.touchEvent(message);
    
                            } }
    
                        break;
                    }
                }
                    //The touch event was not consumed.
                    return super.touchEvent(message);
            }
            catch(Exception eol)
            {
                return super.touchEvent(message);
            }
        }
    

    I do this on tab2.setfocus (), if I call setfocus it works... but if icall it separately as it is not and it hangs. very strange

    // delete(tabArea);
                            //  tabArea = displayTab2();
                            //  add(tabArea);
    
    
    
  • Convert Dialog.alert to handle the touch event

    Anyone know how I can convert my dialog.alert to handle the touch event

    Please help me = D

    You don't need - if you use the standard RIM dialogue he class shoud touch event itself.

  • Get on touch event BB10 Simulator

    IM studying BB10 Webworks. For exl I have this:











    How can I get the event when I touch a div? It's ok when working with web by onclick but with Simulator, I do not know how to get the key events. Can someone help out me, tks so much

    Here is an example page that allows to understand how touch events:

    http://BlackBerry.github.IO/WebWorks-samples/kitchenSink/HTML/browser/touch.html

    On the BlackBerry 10 Simulator, you should expect to see the TouchStart, TouchMove events and touchstart SHOOTING when you interact with the content of the page with the mouse (Note: will also fire the click event).  Make sure that you are listening and managing events of button correctly.

  • AddEventListener Webworks Javascript PlayBook for mouse/touch events

    I am writing an app for the Playbook using Webworks BB. Inside the application, I have a few items 'div' that users can grab and move them. I implemented it and tested on the desktop browser and it works very well. But I have a few questions about the Playbook:

    For some reason I'm not able to get the mouse/touch events... Here is a small code snippet:

    ....

    ....

    OK trouvé un woraround à ce problème en utilisant : http://ross.posterous.com/2008/08/19/iphone-touch-events-in-javascript

Maybe you are looking for

  • Goal of compatibility with 5 d III - Canon EF-S 18-55mm f/3.5-5.6

    I just bought a Canon 5 d III. I have a Canon EF-S 18-55mm f/3.5-5.6 that does not fit, but do my other Canon lenses. Is this compatible with the 5 d III?

  • Have Vista but corrupted. Is it possible for me to install Windows 7 after I am reformatting my computer?

    I thought that the monitor of my pc got broke out but when I tried to turn it on, it showed me the splash screen.  I came to realize that the monitor was never dismantled.  However, my laptop used to run Windows Vista, but now it's like trying to run

  • U2414H, button Power LED

    Hi all I wonder is it possible to disable this Power LED flashing light when the monitor is in standby mode? Basically as monitor is close to my head at night that LED light is now half of my room in light. The only thing that is noticed in the OSD m

  • Speech and cisco Unity Connection connect

    Hi all, I've read that speech Connect is available for Cisco Unity Connection Version 7.1.3 and later versions. I installed CUC7.1.3 and CUCM 7.1.3 and I would like to configure this feature. If someone have this plase share tips or a document. Thank

  • Malfunction of Lightroom adjustment brush

    Lightroom 4.1.  In development mode, the adjustment brush is malfunction.   I can select the area to adjust, but when the adjustment is made, the TOTAL image adjusts to this setting... not only the selected area.   The program is not limiting the adj