I didn't double confirm if it does trigger three times by creating a
plain simple view yet. Below is my code.  Now I add a timer so that
the program just ignore the following trigger in 2 seconds.

Has anybody encountered this problem before?

    private Date oldDate = new Date();
        @Override
        public boolean onTouchEvent(MotionEvent event) {

                //I don't know why it just trigger onTouchEvent three times 
every
time I click on the screen
                //so, now I change the program don't response to continuous 
quick
touches (if they are)
                //maybe I coded somewhere wrong that triggers 3 times events.
                Date now = new Date();
                if (now.getTime() - oldDate.getTime() > 2000){
                        oldDate = now;
                } else {
                        return true;
                }

        ClassicCard c = null;
        Point p = new Point ((int)event.getX(), (int)event.getY());

        if( deck.contains( p ) )
            getNewCards();


                this.invalidate();

                return true;
        }

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to