Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to set directions when i use swipe ? #352

Open
roybill opened this issue Aug 24, 2021 · 0 comments
Open

how to set directions when i use swipe ? #352

roybill opened this issue Aug 24, 2021 · 0 comments

Comments

@roybill
Copy link

roybill commented Aug 24, 2021

    CardStackAdapter cardStackAdapter = new CardStackAdapter();
    cardStackAdapter.setSpots(spotList);
    CardStackView cardStackView = getBinding().csv;
    CardStackLayoutManager manager = new CardStackLayoutManager(this);
    manager.setStackFrom(StackFrom.Bottom);  
    manager.setVisibleCount(4);           
    manager.setTranslationInterval(12.0f);  
    manager.setDirections(Direction.VERTICAL);   
    manager.setCanScrollHorizontal(false); 
    manager.setCanScrollVertical(true);   
    cardStackView.setLayoutManager(manager);
    cardStackView.setAdapter(cardStackAdapter);

    getBinding().btnNext.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            manager.setDirections(Direction.VERTICAL);   //    it doesn't work !!!
            cardStackView.swipe();
        }
    });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant