Question

I am creating an android application to detect the gestures. For this I have referred the following link.

In the main.xml, they are using android.gesture.GestureOverlayView to find the gesture. But I want to use Imageview instead of android.gesture.GestureOverlayView.

Note: I have searched in the internet. I got the following ref. But this is not helped me.

Android Gestures over an image

Is it possible? How can I achieve this?

Was it helpful?

Solution

Please read the documentation of GestureOverlayView:

A transparent overlay for gesture input that can be placed on top of other widgets or contain other widgets

Note the two words transparent and overlay. You can use it on top of any view - just use an appropriate Layout (Hint: try FrameLayout or RelativeLayout) or add views to it (as it is a sub-class of FrameLayout).

There are tutorials out there like this: Android Gestures - Tutorial.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top