Q:

android: button incorporated with GestureListener: onScroll

I have a button (a boy), of which I wish that, when the boy is touched, it can scroll left or right according to the gesture of the user's finger. 
So I have implemented as follows:
Declaration:
GestureDetector myGesture;
myGesture = new GestureDetector(getContext(), new MyOnGestureListener());

Register:
          image_boy.setOnTouchListener(new OnTouchListener()
          {
               @Override
               public boolean onTouch(View v, MotionEvent event) 
               {
                   return myGesture.onTouchEvent(event);
               }
          });
          image_boy.setClickable(true);  

Class:
    class MyOnGestureListener implements OnGestureListener{

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

      @Override
      public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) 
      {
       return false;
      }

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

      }

      @Override
      public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) 
      {
            boy_x = ((int) e2.getX());
            if (boy_x > (viewWidth - BOY_WIDTH))
            {
                boy_x = viewWidth - BOY_WIDTH - 10;
            }

            if (boy_x <0)
            {
                boy_x = 0 + 10;     
            }
            image_boy.setX(boy_x); 
            image_boy.setY(viewHeight - BOY_HEIGHT); 

       return true;
      }

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

      }

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

Question:
The boy, once touched / pressed, can scroll left and right, but it looks obviously weird, as 

once touched and scrolled, the boy will scroll to the correct direction, but switching / shaking with 2 boy images, left and right interchanging during its journey
when the finger movement is stopped (still touching), the boy will go back to either the original position or new position (very unstable)

How could this be solved? 

A:

I have managed to implement using another way using onTouch's ACTION_MOVE:
  button_test= (Button) findViewById(R.id.button_test);
  button_test.setOnTouchListener(new OnTouchListener()
  {               
      private float x, y;    
      private int mx, my;             
      public boolean onTouch(View v, MotionEvent event) 
      {    
          switch(event.getAction()) 
          {     
          case MotionEvent. ACTION_DOWN:    
              x = event.getX();    
              y = event.getY();    
          case MotionEvent. ACTION_MOVE:    
              mx = (int)(event.getRawX() - x);    
              my = (int)(event.getRawY() - 50 - y);    
              button_test.setX(mx);
              button_test.setY(my);

              break;    
          }    
          return true;    
      }}); 

