title: Handle touch/drag event in scrollview - android
body: <p>I am using touch listener on my views to drag them. <code>findViewById(R.id.myimage1).setOnTouchListener(new MyTouchListener());</code>    </p>
  
  <p>Unfortunately there are lots of views therefore I have to stack them in a scrollview.  </p>
  
  <p><strong>Here is the touch listener:</strong></p>
  
  <pre><code>private final class MyTouchListener implements View.OnTouchListener {
      public boolean onTouch(View view, MotionEvent motionEvent) {
          if (motionEvent.getAction() == MotionEvent.ACTION_DOWN) {
              ClipData data = ClipData.newPlainText("", "");
              View.DragShadowBuilder shadowBuilder = new View.DragShadowBuilder(view);
              view.startDrag(data, shadowBuilder, view, 0);
              view.setVisibility(View.INVISIBLE);
              return true;
          } else {
              return false;
          }
      }
  }
  </code></pre>
  
  <p>Because of this touch listnener I am unable to scroll the listview.<br>
  When I try to scroll, the touch listener fires and view's shadow is created instead of scroll.  </p>
  
  <p>How can I use both events or can use <strong>Drag n Drop</strong> functionality in a <strong>ScrollView</strong></p>