rubensousa/GravitySnapHelper

Disable flinging

ursusursus opened this issue · 10 comments

Hi, nice effect but being able to fling which turns into linear scroll really ruins it, id like to mimic view pager physics, exactly how google play does it

thanks

Did you try using GravityPagerSnapHelper?

Didnt know about it, thanks!
Now when Im trying it, its more of what I want, but is there a way to customize it? Say google play one "feels" better, i.e. when I fling it "pages" more items not just one, like GravityPagerSnapHelper

Are you using items with the same width as the google play ones? It should be identical.

Yes same width. The logic seems fine, but its way to hard to fling it, so Im guessing adjusting som "friction" attribute?

I also need disable flinging effect like google play,had you solved the problem?

Hy friends, how to remove this error java.lang.IllegalStateException: An instance of OnFlingListener already set.

i'm adding snaps dynamicaly and this error occur.

Closing due to inactivity

@ursusursus, this will be added in 2.2.0

@rubensousa This isn't working as expected. Setting setMaxFlingSizeFraction(1.0F) on a full screen RecyclerView where each item occupies the entire viewport still allows to fling through more than 1 item at a time on vertical layouts (haven't tried with horizontal ones).