title: How to use SwipeDismissBehavior.OnDismissListener on RecyclerView
body: <p>I am trying to use the <code>SwipeDismissBehavoir</code> from design support library. I've list items in <code>RecyclerView</code> and swiping an item have to dismiss (like google inbox app) .</p>
  
  <p>I've set the listener for the <code>RecyclerView</code> items but the <code>SwipeDismissBehavior</code> <code>onDismiss</code> listener is not getting called.</p>
  
  <pre><code>  SwipeDismissBehavior behavior = new SwipeDismissBehavior();
  
      CoordinatorLayout.LayoutParams params = (CoordinatorLayout.LayoutParams)mItemLayout.getLayoutParams();
      params.setBehavior(behavior);
      behavior.setListener(new SwipeDismissBehavior.OnDismissListener() {
          @Override
          public void onDismiss(View view) {
  
          }
  
          @Override
          public void onDragStateChanged(int i) {
  
          }
      });
      mItemLayout.setLayoutParams(params);
  </code></pre>