문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top