MaterialViewPager icon indicating copy to clipboard operation
MaterialViewPager copied to clipboard

Scrolling on one page influences scroll position on other page

Open zirkler opened this issue 9 years ago • 10 comments

Hi,

when I scroll down on page 1 so that the header shrinks, and haven't even touched page 2, then switch to page 2, page 2 is scrolled down a lil bit (probably the height of the header). How can I avoid this behavior?

Thanks and best regards.

zirkler avatar Aug 30 '16 16:08 zirkler

out

zirkler avatar Aug 30 '16 16:08 zirkler

Okay, you need to use this code onPageSelected of ViewPager

this works

MaterialViewPagerHelper.getAnimatorContext(context).onMaterialScrolled(null,0)

nuhkoca avatar Aug 30 '16 16:08 nuhkoca

@nuhkoca Thanks for your response. Your code brings back the header, but I only want the view below to be scrolled on top. Any idea on this?

zirkler avatar Aug 30 '16 18:08 zirkler

@zirkler I haven't tried before I don't have any idea abou that but you can try and say to me how to solve. At the same time I am gonna search sth about that. :)

nuhkoca avatar Aug 30 '16 18:08 nuhkoca

I'm having this issue too! Weird, different pages should have different scroll states. @florent37

TigerHix avatar Sep 05 '16 14:09 TigerHix

+1 for this issue, @florent37

vanjavanjavanja avatar Oct 02 '16 22:10 vanjavanjavanja

Thanks, your suggestion saved me!

Here's my MaterialViewPager class, onPageSelected method: onPageSelected.txt

xjpmauricio avatar Nov 04 '16 18:11 xjpmauricio

hello.....does anybody find solution for this problem... Thanx in advance. :)

hmathur127 avatar Feb 20 '17 13:02 hmathur127

+1 for this issue, @florent37

daniestrella1 avatar Mar 10 '17 23:03 daniestrella1

+1 for this issue, @florent37

hmathur127 avatar Apr 22 '17 16:04 hmathur127