title: How to detect fling on TextView without cancelling scroll?
body: <p>Trying to detect a fling on a  TextView using simpleGestureDetector:</p>
  
  <pre><code>public void onCreate(Bundle savedInstanceState) {
  
      ...
  
      textContent.setOnTouchListener(new View.OnTouchListener() {
          public boolean onTouch(View v, MotionEvent ev) {
                  return gestureDetector.onTouchEvent(ev);
          }        
      });
  }
  
  class MyGestureDetector extends SimpleOnGestureListener {
      @Override
      public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
  
              if(foo) {
                  fooBar();
                  return true;
              }
          return super.onFling(e1, e2, velocityX, velocityY);
      }
  } 
  </code></pre>
  
  <p>This works in the sense that my code <code>fooBar()</code> is run if the conditions <code>foo</code> are met, but the problem I find is that when the conditions aren't met, returning super.onFling() causes the fling to be cancelled, it seems, since the textview scroll no longer continues after the finger is lifted on a fling.  Here is the XML:</p>
  
  <pre><code>&lt;RelativeLayout
      android:id="@+id/main_area"
      android:layout_height="match_parent"
      android:layout_width="match_parent"&gt;
      &lt;TextView
          android:id="@+id/main_text"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:padding="10dp"
          android:textSize="16dp"
          android:lineSpacingExtra="2dip"
      /&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Is there any way I can keep the ordinary scroll behaviour and still detect the fling?</p>
  
  <p>EDIT: Sorry, my bad, this had nothing to do with the gesture detector, it was just because I took the TextView out of its ScrollView - for some reason it seems TextViews don't have smooth (inertia) scrolling like ScrollViews.</p>