views:

48

answers:

1

I have a my main.xml as a ViewFlipper which imports 5 views for my program. If I wrap the whole main.xml in GestureoverlayView I can detect gestures just fine with my listener, however, it displays the gesture on the screen.

I don't want the gestures shown i just want them detected so I tried applying the touch listener to the ViewFlipper but it simply doens't detect the gestures.

Is this because the ViewFlipper is hidden behind the 5 imported layouts that are displayed?

how do I apply the gesture detection to my app without having the OverlayView show the gestures on the screen?

Thanks

A: 

I found a solution where I'm not applying the gesture detection strictly to any of the layouts, but programmatically applying it to the activity.

GestureDetector gestureListener = new GestureDetector(this);

Once it gives an error simply tell it to implement the unimplemented methods and then code inside them as necessary.

Hamid