Open FedericoOldrini opened 9 years ago
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); }
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
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
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.
Can you post an example with ScrollView or with the new RecycleView class? Thanks