Closed HellAmbro closed 5 years ago
I've looked at the source code and i found the solution.
Hi Wosham, Do u mind sharing the source code for this solution? Thanks :)
`This is my code,i hope it's helpful
private MyAdapter mAdapter;
private CardStackView mCardStackView;
private void initCardStack() {
mAdapter = new MyAdapter(this);
mCardStackView = findViewById(R.id.card_stack_view);
mCardStackView.setAdapter(mAdapter);
CardStackLayoutManager manager = new CardStackLayoutManager(this, new CardStackListener() {
@Override
public void onCardDragging(Direction direction, float ratio) {
}
@Override
public void onCardSwiped(Direction direction) {
}
@Override
public void onCardRewound() {
}
@Override
public void onCardCanceled() {
}
@Override
public void onCardAppeared(View view, int position) {
}
@Override
public void onCardDisappeared(View view, int position) {
}
});
mCardStackView.setLayoutManager(manager);
}
} `
Hi, i'm trying to set CardStackListener to my CardStackView but i can't find method such as addCardStackListener or setCardStackListener. I'm using Java and i don't know Kotlin. How can i set this listener? Thanks