I got strange behavior (it doesn't snap pages) on ...
# compose
i
I got strange behavior (it doesn't snap pages) on accompanist view pager interact. On the video at first i try swipe pages, then i use control to change pages, then swipe with fingers again. In case when I use pager control then pages snaps correctly, but when i use finger pager works like recycler view. Pager control is not the problem source, because i commented it and behavior haven't changed. Do you have any ideas what can lead that behavor? Or maybe somewho met same behavior?
y
Can you share some of your code? I use the accompanist view pager but never had such issues.
i
Sorry, but i can not. Now i am trying to reduce complexity and throw out all unnecessary, but hasn't got result yet
😐 1
y
Okay but I can just say that in my use I did not have such issue and it might be that there is something wrong in your code. But the library is not that stable so who knows.
i
Funny thing is i tried to reproduce it on sample project, but pager worked well
so yes, something lead this behavior, but i don't understand what i should to dig
y
Then that makes the possibility of your code having issues more
i
now pager page in same nav graph (animated nav graph) with bottom navigation screen, i do that because i need to code few fullscreen flows. And inside screen with bottom navigation i am also has view pager and it works well. I reduce complexity and now i fill bad working pager with only integers (transformed to
Text
), but it continues behave wrong
I understand that without source code my question looks funny. Hey, dudes, guess what happens with my code?
😄 3
But i hope that anybody mets same behavior and can advice me something
y
I have some weird issues & even crashes with the Accompanist view pager but no such scrolling issue
c
Yeah. I've had a lot of weird issues with pager, but not this. 😄
i
I had not enough time to find out the bug reason, but looks like animated nav controller can lead that
I’ve found the cause, it’s weird
I have modal navigation drawer over navigation graph and open screen with pager from navigation drawer before it closed
If i remove navigation drawer from equation - paging works well
If i add delay between nav drawer click (it closes on click) and open crean with pager all also works well
To clarify - i did not close navigation drawer before opening the screen with pager. it closed authomatically. If i close it by myself - pager also snapping