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

Unable to implement Swipe Refresh Layout in CardStackView. #16

Open
kashyapasrc opened this issue Mar 6, 2018 · 2 comments
Open

Unable to implement Swipe Refresh Layout in CardStackView. #16

kashyapasrc opened this issue Mar 6, 2018 · 2 comments
Assignees

Comments

@kashyapasrc
Copy link

kashyapasrc commented Mar 6, 2018

Hi, You have done very great job. I want to implement SwipeRefreshLayout in CardStackView, on Scrolling the cards the SwipeRefreshlayout refreshing the View. If it is recyclerview or WebView we can handle this case, but in CardStackView how can we do this?

@ToDou
Copy link
Member

ToDou commented Mar 13, 2018

I can try that with the nest scroll

@ToDou ToDou self-assigned this Mar 13, 2018
@kashyapasrc
Copy link
Author

kashyapasrc commented Apr 7, 2018

Hi, I have tried to implement the functionality in StackScrollDelegateImpl for the UpDownStackAnimation class.

@Override
public void scrollViewTo(int x, int y) {
    x = clamp(x, mCardStackView.getWidth() - mCardStackView.getPaddingRight() - mCardStackView.getPaddingLeft(), mCardStackView.getWidth());
    y = clamp(y, mCardStackView.getShowHeight(), mCardStackView.getTotalLength());
    mScrollY = y;
    mScrollX = x;
    updateChildPos();
   //It will  work like SwipeRefreshLayout in RecyclerView.
    mCardStackView.getSwipeRefreshLayout().setEnabled(xScrollY==0);
    

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants