Log in or register to post comments

Gesture detector did not work

April 9, 2013 - 4:50am #1

Hi, I'm running the ImageTarget sample app on Galaxy note 1. When I tap (either single or double) my screen, the method did not get called. I tried to debug by put the log message and the log message did not  displayed in myLog cat. 

In my onCreate the gesture detector has been initialized. Any idea?

Gesture detector did not work

April 9, 2013 - 8:10am #7

Using the FOCUS_MODE_MACRO might be the reason for your issue; try using FOCUS_MODE_NORMAL and test again, to see if it makes any difference.

 

Gesture detector did not work

April 9, 2013 - 7:50am #6

More than once, but autoFocus function only worked once. I still tried to find out what's wrong.. Is that due to I set the focus mode to be FOCUS_MODE_MACRO ?

Gesture detector did not work

April 9, 2013 - 7:26am #5

So, if you put a Log message inside onSingleTapUp function, do you see a Log only the first time, or more than once ?

 

Gesture detector did not work

April 9, 2013 - 6:36am #4

Yes, but why when I did single tap, autofocus native method only worked once although I did several time of single tap and . besides, double tap never get called.. Do you have any idea?

Gesture detector did not work

April 9, 2013 - 5:31am #3

In particular, in ImageTargets.java, you should see this code:

public boolean onTouchEvent(MotionEvent event)
    {
        // Process the Gestures
        return mGestureDetector.onTouchEvent(event);
    }
 
Can you put a log there, to see in onTouchEvent is called ?
 

Gesture detector did not work

April 9, 2013 - 5:29am #2

Hi, have you made any other changes to the original sample code (beside the log instructions) ?

 

Log in or register to post comments