title: Gesture Listener onFling Not Acting Consistant
body: <p><strong>Update:  See bounty for expanded question.</strong></p>
  
  <p>I have a <code>GestureDetector</code> setup on a <code>ListView</code>.  The ListView is an entire fragment that comes from side of window and overlays another fragment partially.  I want to give user ability to swipe it close (i.e. Wunderlist is a great example of this function on right side).</p>
  
  <p>Here is my setup:</p>
  
  <pre><code>    gestureListener = new View.OnTouchListener() {
          public boolean onTouch(View v, MotionEvent event) {
  
              if (gestureDetector.onTouchEvent(event)) {
                  return true;
              }
  
              return false;
          }
      };
      listView.setOnTouchListener(gestureListener); 
  </code></pre>
  
  <p><strong>The Listener itself:</strong></p>
  
  <pre><code>public class GestureListener extends SimpleOnGestureListener {
  
          private static final int SWIPE_MIN_DISTANCE = 180;
          private static final int SWIPE_THRESHOLD_VELOCITY = 50;
  
          @Override
          public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,
                  float velocityY) {
  
              try {
                  if (e2.getX() - e1.getX() &gt; SWIPE_MIN_DISTANCE
                          &amp;&amp; Math.abs(velocityX) &gt; SWIPE_THRESHOLD_VELOCITY) {
  
                      FragmentManager fma = getActivity()
                              .getSupportFragmentManager();
  
  
  
                      FragmentManager fm = getFragmentManager();
                      FragmentTransaction t = fm.beginTransaction();
  
                      SherlockListFragment mFrag = new RateReviewFragment();
  
                      t.add(R.id.main_frag, mFrag);
                      t.setCustomAnimations(R.anim.animation_enter,
                              R.anim.animation_leave);
                      t.remove(mFrag);
                      t.commit();
  
                  }
                  return false;
              } catch (Exception e) {
  
              }
              return false;
          }
  
  
  
  
  
          @Override
          public void onLongPress(MotionEvent e) {
  
              // edited out; this opens up a context menu
          }
  
      }
  </code></pre>
  
  <p>Sometimes, when the <code>ListView</code> scrolls to the bottom (or list scrolling is interrupted with clicks on a list row) the <code>GestureListener</code> simply stops ... listening. Swiping will not work. You have to scroll back to top to get it to work again.</p>
  
  <p>If anyone can help me isolate these issues I would be grateful!</p>
  
  <p><strong>UPDATE : Only one issue remains, "the listener stops listening"</strong>  </p>
  
  <p><strong>UPDATE TWO:  I may have figured out what is CAUSING this; just dont know the fix:</strong></p>
  
  <p>I have found something out after logging my actions; The lower I get in the list (and the more I interact with it), the measurements are not consistent. For example, if I move my finger a centimeter left and right - at very top of list, it will say I moved, for example, 200 pixels. But when I have the problem stated above, it is far lower, maybe 50, for the <em>SAME</em> 1 centimeter distance. So the window doesn't close because it's not meeting my <code>if</code> conditions.</p>
  
  <p><em>Sidenote</em>:  I have stated more than once, the problem is when "interacting with the list".  This means:  If I quickly scroll from top to bottom; no issue;  but If I slowly work my way down, perhaps tapping on the screen, scrolling on and off, clicking buttons on the <code>listView</code>, some of which open a new activity (and then come back to same position), this is "interacting" with".</p>