Но в моем случае это работает.Я возвращаю true во внутреннем классе textView, но я возвращаю false из моего TouchEvent.
public class FingureGesture extends Activity implements OnGestureListener,OnDoubleTapListener{
GestureDetector detector;
File sdcard = Environment.getExternalStorageDirectory();
TextView textView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.fingure_gesture);
detector = new GestureDetector(this,this);
textView = (TextView) findViewById(R.id.editText1);
textView.setOnTouchListener(new OnTouchListener() {
public boolean onTouch(View v, MotionEvent event) {
Log.i("OnTouch", "Im here ");
detector.onTouchEvent(event);
return false;
}
});
}//end of onCreate
public boolean onDown(MotionEvent e) {
Log.i("onDown ", "x:: "+e.getX()+"\ny:: "+e.getY());
return false;
}
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,
float velocityY) {
return false;
}
public boolean onTouchEvent(MotionEvent me){
Log.i(" onTouchEvent", me.toString());
this.detector.onTouchEvent(me);
// return super.onTouchEvent(me);
return true;
}
public void onLongPress(MotionEvent e) {
Log.i(" onLongPress", e.toString());
}
public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX,
float distanceY) {
Log.i("On Scroll ","\n#e1 :: "+ e1.getX()+"\n#Histo e1.x"+"\n#e2 :: "+e2.getX());
return false;
}
public void onShowPress(MotionEvent e) {
Log.i(" onShowPress", e.toString());
}
public boolean onSingleTapUp(MotionEvent e) {
Log.i("onSingleTapUp ", e.toString());
return false;
}
public boolean onDoubleTap(MotionEvent e) {
Log.i(" onDoubleTap", e.toString());
return false;
}
public boolean onDoubleTapEvent(MotionEvent e) {
Log.i(" onDoubleTapEvent", e.toString());
return false;
}
public boolean onSingleTapConfirmed(MotionEvent e) {
Log.i(" onSingleTapConfirmed", e.toString());
return false;
}