Hi to all,
Is there any class which have combined functionality of ScaleGestureDetector and GestureDetector ?
I am using below code for onTouchEvent but only one gesture class is running. If I want to use all the functions of GestureDetector as well as ScaleGestureDetector
@Override
public boolean onTouchEvent(MotionEvent ev)
{
if (mScaleDetector.onTouchEvent(ev))
return true;
else if (mGestureDetector.onTouchEvent(ev))
return true;
else
return false;}
where mScaleDetector is ScaleGestureDetector and mGestureDetector is GestureDetector
thanks in advance
For me doing something like
seems to work. The explanation may be that when you do a boolean and between them, it will process both methods in order to obtain the result to be returned.
The issue with your approach may be that you perhaps forgot to return true when one of the gesture methods consumed the event.
Hope this helps,
Mihai