2011-10-20 3 views

답변

9

사용이 :

final GestureDetector gestureDetector = new GestureDetector(context,new GestureDetector.SimpleOnGestureListener() { 
    public boolean onDoubleTap(MotionEvent e) { 
     Log.e("", "Open new activty here"); 
     return true; 
    } 
}); 
TextView tv = (TextView) findViewById(R.id.editTextID); 
tv.setOnTouchListener(new OnTouchListener() { 
    public boolean onTouch(View v, MotionEvent event) { 
     return gestureDetector.onTouchEvent(event); 
    } 
}); 
+0

감사 다니엘! "새로운 OnTouchListener()"내가 로 대체 작동하지 않는 "새로운 View.OnTouchListener는()" –

+1

는 중단 문제가 최종 GestureDetector gestureDetector = 새로운 GestureDetector (이, 새로운 GestureDetector.SimpleOnGestureListener() { –

+0

정확한 솔루션으로 대체 해결하려면. –

관련 문제