title: Android - Gesture Detection (Swipe up/down) on particular view
body: <p>I am trying to implement the OnGestureListener in Android. <br/>I have three TextViews in my layout. <br/>What  i am trying to achieve is to set Gesture Listener for two of the textViews .<br/>
  Here is the <strong>layout</strong> - 
  <br/></p>
  
  <pre><code>    &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/rlMain"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content" &gt;
  
      &lt;TextView
          android:id="@+id/tvOne"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:layout_centerHorizontal="true"
          android:layout_marginBottom="10dp"
          android:layout_marginTop="5dp"
          android:gravity="center"
          android:text="One" /&gt;
  
      &lt;TextView
          android:id="@+id/tvTwo"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:layout_below="@+id/tvOne"
          android:layout_centerHorizontal="true"
          android:layout_marginBottom="10dp"
          android:layout_marginTop="5dp"
          android:gravity="center"
          android:text="Two" /&gt;
  
      &lt;TextView
          android:id="@+id/tvThree"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:layout_below="@+id/tvTwo"
          android:layout_centerHorizontal="true"
          android:layout_marginBottom="10dp"
          android:layout_marginTop="5dp"
          android:gravity="center"
          android:text="Three" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>And here is the <strong>activity</strong></p>
  
  <pre><code>    import android.app.Activity;
      import android.os.Bundle;
      import android.util.Log;
      import android.view.GestureDetector;
      import android.view.GestureDetector.OnGestureListener;
      import android.view.MotionEvent;
  
      public class TimeActivity extends Activity implements OnGestureListener {
  
      GestureDetector gestureScanner;
  
      @SuppressWarnings("deprecation")
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.wheelview);
          gestureScanner = new GestureDetector(this);
  
      }
  
      @Override
      public boolean onTouchEvent(MotionEvent event) {
          // TODO Auto-generated method stub
          return gestureScanner.onTouchEvent(event);
      }
  
      @Override
      public boolean onDown(MotionEvent e) {
          // TODO Auto-generated method stub
          return true;
      }
  
      @Override
      public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,
              float velocityY) {
          // TODO Auto-generated method stub
          Log.i("Test", "On Fling");
          return true;
      }
  
      @Override
      public void onLongPress(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 onShowPress(MotionEvent e) {
          // TODO Auto-generated method stub
  
      }
  
      @Override
      public boolean onSingleTapUp(MotionEvent e) {
          // TODO Auto-generated method stub
          return false;
      }
  }
  </code></pre>
  
  <p>At present Fling for all the three textviews is getting called .<br/> Is there any way through which i can set the <strong>Gesture Listener for some particular views in the layout</strong>.<br/>
  Any help will be highly appreciated.</p>