cardslib icon indicating copy to clipboard operation
cardslib copied to clipboard

onUndoSwipe never called

Open leijdekkers opened this issue 9 years ago • 0 comments

I have activated card.setSwipeable(true) and mCardArrayAdapter.setEnableUndo(true) and set the following listeners on my card (see below). 2 listeners work as expected but not the setOnUndoSwipeListListener. I press the Undo button on the snackbar but the onUndoSwipe is never called. Any idea why?

I use version com.github.gabrielemariotti.cards:library:1.9.1 as the library in my project

card.setOnSwipeListener(new Card.OnSwipeListener() { @Override public void onSwipe(Card card) { Log.e(Constants.TAG, "onSwipe()"); } });

card.setOnUndoSwipeListListener(new Card.OnUndoSwipeListListener() {
    @Override
    public void onUndoSwipe(Card card)
    {
        Log.e(Constants.TAG, "onUndoSwipe()");
    }
});

card.setOnUndoHideSwipeListListener(new Card.OnUndoHideSwipeListListener() {
    @Override
    public void onUndoHideSwipe(Card card)
    {
        Log.e(Constants.TAG, "onUndoHideSwipe()");
    }
});

leijdekkers avatar Oct 26 '15 01:10 leijdekkers