Android-ParallaxHeaderViewPager icon indicating copy to clipboard operation
Android-ParallaxHeaderViewPager copied to clipboard

How to use with RecycleView or with ScrollView?

Open FedericoOldrini opened this issue 10 years ago • 4 comments

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

FedericoOldrini avatar Nov 26 '14 16:11 FedericoOldrini

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

xifan-xf avatar Dec 18 '14 07:12 xifan-xf

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

nschwermann avatar Feb 09 '15 20:02 nschwermann

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

FedericoOldrini avatar Feb 11 '15 12:02 FedericoOldrini

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.

nschwermann avatar Feb 11 '15 17:02 nschwermann