Comments (14)
Why are you using Gravity.BOTTOM instead of Gravity.START? In that demo, you're displaying an horizontal RecyclerView
from gravitysnaphelper.
That was dumb haha, sorry about that, changing to START solved it.
Anyway, using END still gives me the same weird behaviour, any ideas ?
Thanks
from gravitysnaphelper.
Can you record it again for the Gravity.END case?
from gravitysnaphelper.
It's the very same behaviour.
from gravitysnaphelper.
But it helps anyway :)
Are you using the same code as the above?
from gravitysnaphelper.
Exactly, but instead of using BOTTOM I'm using END.
A new record :)
Thanks for the quick reply !
from gravitysnaphelper.
Weird, in that recording it seems like Gravity.START is applied. Where are you setting the LayoutManager to the RecyclerView?
from gravitysnaphelper.
Yeah, that's the same impression I have.
The entire snippet:
LinearLayoutManager layoutManager = new LinearLayoutManager(mContext);
layoutManager.setOrientation(LinearLayoutManager.HORIZONTAL);
productsRecyclerView.setLayoutManager(layoutManager);
CampaignCarouselAdapter adapter = new CampaignCarouselAdapter(mCampaign.getProducts(), mContext, mCampaign.showMoreButtonCarousel());
productsRecyclerView.setAdapter(adapter);
SnapHelper snapHelper = new GravitySnapHelper(Gravity.END, false);
productsRecyclerView.setOnFlingListener(null);
snapHelper.attachToRecyclerView(productsRecyclerView);
from gravitysnaphelper.
I can't find anything wrong. I would suggest you to try and isolate the cause by creating a simple layout based on the sample in this repository.
Check if you're sharing the instance of productsRecyclerView anywhere and setting another snaphelper.
from gravitysnaphelper.
Sure, I'll give it a try and share the feedback in a while !
Thanks again for the help !
from gravitysnaphelper.
Any updates on this?
from gravitysnaphelper.
I have no time to check this out, gonna close the issue. If it happens occuring, I'll reopen it !
Thanks
from gravitysnaphelper.
I have same issue. On a horizontal RTL recyclerview which has GravitySnapHelper(Gravity.END)
property.
from gravitysnaphelper.
@mojsho could you solve it?
from gravitysnaphelper.
Related Issues (20)
- GridLayoutManager.SpanSizeLookup is not considered HOT 1
- Show the vertical recyclerview below the horizontal HOT 3
- Question: how to snap right away, and also while allowing first&last items to also be in center? HOT 16
- a GravityPagerSnapHelper snap bug in version 1.5 HOT 6
- GravitySnapHelper dont return the first position when the user scroll at (0,0) position HOT 1
- GravitySnapHelper ignores RecyclerView padding in 2.0 HOT 4
- 222 HOT 1
- how set adapter for that HOT 1
- the first item cannot snap to center HOT 2
- Any help on having a Carousel Effect in this? HOT 1
- GravitySnapHelper.SnapListener not callback when scroll to first position. HOT 7
- can not scroll to the top position when call smoothScrollToPosition(0)
- Gravity.BOTTOM with margin HOT 1
- Does this can work like PagerSnapHelper HOT 7
- Library artifacts are published to jcenter only, which will close in 3 months HOT 1
- how to make hightlight snap item center
- Could not download package HOT 2
- Snap with decoration
- IllegalArgumentException when setting snapGravity to center HOT 3
- Prevent snap on items which are bigger than the viewport
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gravitysnaphelper.