title: DragGestureDetector is not called
body: <p>Can Anyone tell me What is wrong in my code? i am using customadapter class and i set this adapter in cardstack when i am trying to swipe card, swipe is not working beacuse DragGestureDetector is not called.</p>
  
  <p>i am using this library project
  <a href="https://github.com/wenchaojiang/AndroidSwipeableCardStack" rel="nofollow">wenchaojiang/AndroidSwipeableCardStack</a></p>
  
  <p>here is my code</p>
  
  <pre><code> private void setupAnimation(){
      final View cardView = viewCollection.get(viewCollection.size()-1);
  
  
      mCardAnimator = new CardAnimator(viewCollection);
  
  
      mCardAnimator.initLayout();
  
    final  DragGestureDetector dd = new DragGestureDetector(mContext,new DragGestureDetector.DragListener(){
  
          @Override
          public  boolean onDragStart(MotionEvent e1, MotionEvent e2,
                                  float distanceX, float distanceY) {
  
              Log.e("CardAnimator", "Dragstsrt");
              mCardAnimator.drag(e1, e2, distanceX, distanceY);
              return true;
          }
  
          @Override
          public boolean onDragContinue(MotionEvent e1, MotionEvent e2,
                                     float distanceX, float distanceY) {
              float x1 = e1.getRawX();
              float y1 = e1.getRawY();
              float x2 = e2.getRawX();
              float y2 = e2.getRawY();
  
              Log.e("CardAnimator", "Dragcontjnhue");
              //float distance = CardUtils.distance(x1,y1,x2,y2);
              final int direction = CardUtils.direction(x1,y1,x2,y2);
              mCardAnimator.drag(e1,e2,distanceX,distanceY);
              mEventListener.swipeContinue(direction, Math.abs(x2-x1),Math.abs(y2-y1));
              return true;
          }
  
          @Override
          public  boolean onDragEnd(MotionEvent e1, MotionEvent e2) {
              //reverse(e1,e2);
              float x1 = e1.getRawX();
              float y1 = e1.getRawY();
              float x2 = e2.getRawX();
              float y2 = e2.getRawY();
              float distance = CardUtils.distance(x1,y1,x2,y2);
              final int direction = CardUtils.direction(x1,y1,x2,y2);
  
              boolean discard = mEventListener.swipeEnd(direction, distance);
              if(discard){
  
                  Log.e("CardAnimator", "Dragend");
                  mCardAnimator.discard(direction, new AnimatorListenerAdapter(){
  
                      @Override
                      public void onAnimationEnd(Animator arg0) {
                          mCardAnimator.initLayout();
                          mIndex++;
                          mEventListener.discarded(mIndex,direction);
  
                          //mIndex = mIndex%mAdapter.getCount();
                          loadLast();
  
                          viewCollection.get(0).setOnTouchListener(null);
                          viewCollection.get(viewCollection.size()-1)
                                  .setOnTouchListener(mOnTouchListener);
                      }
  
                  });
              }else{
                  mCardAnimator.reverse(e1,e2);
              }
              return true;
          }
  
          @Override
          public boolean onTapUp() {
              mEventListener.topCardTapped();
              return true;
          }
      }
      );
  
      mOnTouchListener = new OnTouchListener() {
          private static final String DEBUG_TAG = "MotionEvents";
          @Override
          public boolean onTouch(View arg0, MotionEvent event) {
              dd.onTouchEvent(event);
              return true;
          }
      };
      cardView.setOnTouchListener(mOnTouchListener);
  }
  </code></pre>