title: Android "Undo" doesn't work for android-swipe-to-dismiss-undo
body: <p>I am using <a href="https://github.com/hudomju/android-swipe-to-dismiss-undo/issues" rel="nofollow">android-swipe-to-dismiss-undo</a> to have swipe to delete gmail efect. </p>
  
  <p><strong>setOnItemClickListener</strong> doesn't work for me. Is this because I use in my adapter <strong>OnLongClickListener</strong> and <strong>setOnCheckedChangeListener</strong>?</p>
  
  <p>Implementation of swipe to dismiss:</p>
  
  <pre><code>final SwipeToDismissTouchListener&lt;ListViewAdapter&gt; touchListener =
              new SwipeToDismissTouchListener&lt;&gt;(
                      new ListViewAdapter(listItems),
                      new SwipeToDismissTouchListener.DismissCallbacks&lt;ListViewAdapter&gt;() {
                          @Override
                          public boolean canDismiss(int position) {
                              return true;
                          }
  
                          @Override
                          public void onDismiss(ListViewAdapter view, int position) {
  // here I delete my item. This works perfectly.
                          }
                      });
      listItems.setOnTouchListener(touchListener);
      listItems.setOnScrollListener((AbsListView.OnScrollListener) touchListener.makeScrollListener());
      listItems.setOnItemClickListener(new AdapterView.OnItemClickListener() {
          @Override
          public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position, long id) {
              if (touchListener.existPendingDismisses()) {
                  touchListener.undoPendingDismiss();
                  Toast.show(MyFragment.this, "x"); // toast never appears
              } else {
                  Toast.show(MyFragment.this, "y"); // toast never appears
              }
          }
      });
  </code></pre>
  
  <p>My adapter:</p>
  
  <pre><code>public class ShoppingItemsCheckListAdapter extends BaseAdapter {
  
  public interface OnCheckItemListener {
      public void onCheckItem(ShoppingItem item, boolean isCheck);}
  
  private List&lt;ShoppingItem&gt; shoppingItemsList = new ArrayList&lt;ShoppingItem&gt;();
  public OnCheckItemListener onCheckItemListener;
  
  private OnItemShoppingListLongListener onItemShoppingListLongListener = null;
  
  public interface OnItemShoppingListLongListener {
      public void onEditItem(ShoppingItem item);}
  
  public ShoppingItemsCheckListAdapter(OnItemShoppingListLongListener onItemShoppingListLongListener, OnCheckItemListener onCheckItemListener) {
      this.onCheckItemListener = onCheckItemListener;
      this.onItemShoppingListLongListener = onItemShoppingListLongListener;}
  
  public void setModel(List&lt;ShoppingItem&gt; shoppingItemsList) {
      this.shoppingItemsList = shoppingItemsList;
      notifyDataSetChanged();}
  
  @Override
  public int getCount() {return shoppingItemsList.size();}
  
  @Override
  public Object getItem(int position) {return shoppingItemsList.get(position);}
  
  @Override
  public long getItemId(int position) {return position;}
  
  @Override
  public View getView(int position, View convertView, ViewGroup parent) {
      convertView = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_item_shopping_item, parent, false);
      final ShoppingItem item = shoppingItemsList.get(position);
      CheckBox checkBox = (CheckBox) convertView.findViewById(R.id.list_item_shopping_item_check);
      checkBox.setOnCheckedChangeListener(new OnCheckedChangeListener() {
  
          @Override
          public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
              onCheckItemListener.onCheckItem(item, isChecked);
          }
      });
      checkBox.setChecked(item.getCheck());
      checkBox.setText(item.getLabel());
      checkBox.setOnLongClickListener(new OnClickEditItemListener(item));
      return convertView;
  }
  
  private class OnClickEditItemListener implements View.OnLongClickListener {
      private ShoppingItem item;
      public OnClickEditItemListener(ShoppingItem item) {
          this.item = item;
      }
      @Override
      public boolean onLongClick(View v) {
          if (onItemShoppingListLongListener != null) {
              onItemShoppingListLongListener.onEditItem(item);
          }
          return true;
      }}}
  </code></pre>
  
  <p>Is there a way to use OnItemClickListener, OnLongClickListener and OnCheckedChangeListener all together?</p>