Click on replace touch event on tablets?

Hello

The click event replace the touch events on the shelves?

I have a side project that I need to work on the computer and iPad.

But I can't tell if it's the click event that works or the touch event is working on the Ipad

Can anyone help?

Hi Robyn,

Events Click will be not to replace the events of button on iOS devices - both types of events are supported.

However, touch events are fired instantly on touch and override to slam events if both co-exist on the same element. Also, the click event handler in the iOS have a predefined time about 300 MS to allow touch events (if they exist) to fire first.

HTH,

Joe

Tags: Edge Animate

Similar Questions

  • 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.

  • touch event on 9530

    Hi all

    I'm working on blakcberry 9530. What in one screen, I use vertical field Manager and add a control to this... like bitmapField. I have a question here.

    I want to do a treatment when you click field. but the thing that happens is when I click on the verticalFieldManager the touchEvent of my bitmapField is called.  Even when I click on the bitmapField then also touchEvent vertical area manager is called.

    Can you tell me how to avoid this? How I come to know that if you click field or Manager is clicked so that I can perform the corresponding procedure in the CLICK event of the field only.

    Thank you best regards &,.

    Sachin

    It is indifferent does not manage the listField touchevent in touchevent Manager...

    Simply place super.touchEvent () when the field is equal to listField. This will automatically scrolls the list and even if you touch the screen also changes.

    for fields other thans list the touchevent hadnel...

    More replace touch venet in the listfield.

    If you override in this reference to the function returns super.touchEvent)

    It will work

  • 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!

  • 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

  • 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);
    
    
    
  • 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.

  • Convert mouse_click actionscript for touch events

    I am currently using a version of CS6 Flash Pro PC.

    I just created a Flash project that activates the buttons and opens other actions within which works perfectly when you use the mouse to click the buttons.

    However, I must now be able to use the same project for the touchscreen feature.

    Friend capable of transforming a mouse_click event code touch events?

    Is how hard it?

    Will I need to completely redo this project?

    I searched high and low on the internet and have found nothing about it.

    Any help is appreciated.

    Thank you

    Michael

    for simple keys (like buttons), it is easier to use MouseEvent.MOUSE_DOWN events instead of TouchEvents.

  • Tecra A9 - sometimes I can not type - click using the touch pad

    There are times that I can not type - click using the touch pad or other keys (all of a sudden without any reason)

    I can move the cursor in this case but not tap - click here to be able to click once again, I have to restart (this happens on both windows and linux)

    On windows, I press alt + ctrl + del and when the Task Manager window I can tap it and after I do I can tap - Select something else and so on.
    Click on the Task Manager click on anything else until I reboot and the problem goes away just to appear suddenly unexpectadly at the same time.

    I have the newest bios and driver accupoint

    Any tips?

    This happens only with touchpad, or when you use an external USB mouse?
    For me it looks more like the Windows operating system freezes for a short period. Is this good?

  • When I click on 'Windows Login event' I get "ERROR 1717"

    Separated from the:

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_xp-performance/Task-Scheduler-Error-1717-event-log-error-126/f9b98257-501F-4aec-BD65-6a5c7b517011

    When I click on 'Windows Login event' I get "ERROR 1717".  If anyone knows how to solve this problem, please answer.  Called MS Tech and she sent me links book to review. It is absolutely rediculus part of MS

    See:

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_xp-performance/can-not-start-event-log-service/3b3b4a88-e62c-4002-BBEE-df25b3016f9f

  • 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

  • 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

  • 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

Maybe you are looking for