gabrielemariotti / cardslib

Android Library to build a UI Card
4.66k stars 1.19k forks source link

onUndoSwipe never called #513

Open leijdekkers opened 9 years ago

leijdekkers commented 9 years ago

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()");
    }
});