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 use with RecycleView or with ScrollView? #12

Open
FedericoOldrini opened this issue Nov 26, 2014 · 4 comments
Open

How to use with RecycleView or with ScrollView? #12

FedericoOldrini opened this issue Nov 26, 2014 · 4 comments

Comments

@FedericoOldrini
Copy link

Can you post an example with ScrollView or with the new RecycleView class? Thanks

@xifan-xf
Copy link

just change this method:
@OverRide
public void adjustScroll(int scrollHeight) {
if (scrollHeight == 0&& scrollView.getScrollY() > Constants.headerHeight) {
return;
}
scrollView.scrollTo(scrollView.getScrollX(),Constants.headerHeight- scrollHeight);
}

@nschwermann
Copy link

That only half way works, if the content of the scrollview isn't greater than the size of the window then the scrollview won't scroll when calling scrollTo

@FedericoOldrini
Copy link
Author

I have also added a "footer" to the content whose height was dinamically calculated so every page can scroll at minimum the full height of the header. But is not a really clean solution

@nschwermann
Copy link

Yeah I was thinking of that, I ended up animating the header back to the original position if canScrollVertically returns false when switching the view page. Also not really the perfect solution but functional.

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

3 participants