posted by Solver Full-stack Developer 2011.06.01 18:35

@Override
 protected void onCreate(Bundle savedInstanceState) {

  gesdet = new GestureDetector(this,
    new GestureDetector.OnGestureListener()
{

     @Override
     public boolean onSingleTapUp(MotionEvent e) {
      // TODO Auto-generated method stub
      return false;
     }

     @Override
     public void onShowPress(MotionEvent e) {
      // TODO Auto-generated method stub
     }

     @Override
     public boolean onScroll(MotionEvent e1, MotionEvent e2,
       float distanceX, float distanceY) {
      // TODO Auto-generated method stub
      return false;
     }

     @Override
     public void onLongPress(MotionEvent e) {
      // TODO Auto-generated method stub
     }

     @Override
     public boolean onFling(MotionEvent e1, MotionEvent e2,
       float velocityX, float velocityY) {

      return false;
     }

     @Override
     public boolean onDown(MotionEvent e) {
      // TODO Auto-generated method stub
      return false;
     }
    });
 }

 @Override
 public boolean onTouchEvent(MotionEvent event) {
  return gesdet.onTouchEvent(event);
 }

ps. if you want doubletab event, you use GestureDetector.

신고
posted by Solver Full-stack Developer 2011.02.15 18:13


신고

티스토리 툴바