Giter VIP home page Giter VIP logo

Comments (14)

rubensousa avatar rubensousa commented on June 11, 2024

Why are you using Gravity.BOTTOM instead of Gravity.START? In that demo, you're displaying an horizontal RecyclerView

from gravitysnaphelper.

leonardo2204 avatar leonardo2204 commented on June 11, 2024

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.

rubensousa avatar rubensousa commented on June 11, 2024

Can you record it again for the Gravity.END case?

from gravitysnaphelper.

leonardo2204 avatar leonardo2204 commented on June 11, 2024

It's the very same behaviour.

from gravitysnaphelper.

rubensousa avatar rubensousa commented on June 11, 2024

But it helps anyway :)

Are you using the same code as the above?

from gravitysnaphelper.

leonardo2204 avatar leonardo2204 commented on June 11, 2024

Exactly, but instead of using BOTTOM I'm using END.
A new record :)

Thanks for the quick reply !

from gravitysnaphelper.

rubensousa avatar rubensousa commented on June 11, 2024

Weird, in that recording it seems like Gravity.START is applied. Where are you setting the LayoutManager to the RecyclerView?

from gravitysnaphelper.

leonardo2204 avatar leonardo2204 commented on June 11, 2024

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.

rubensousa avatar rubensousa commented on June 11, 2024

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.

leonardo2204 avatar leonardo2204 commented on June 11, 2024

Sure, I'll give it a try and share the feedback in a while !

Thanks again for the help !

from gravitysnaphelper.

rubensousa avatar rubensousa commented on June 11, 2024

Any updates on this?

from gravitysnaphelper.

leonardo2204 avatar leonardo2204 commented on June 11, 2024

I have no time to check this out, gonna close the issue. If it happens occuring, I'll reopen it !
Thanks

from gravitysnaphelper.

c0d3sling3r avatar c0d3sling3r commented on June 11, 2024

I have same issue. On a horizontal RTL recyclerview which has GravitySnapHelper(Gravity.END) property.

from gravitysnaphelper.

SetareMaghari avatar SetareMaghari commented on June 11, 2024

@mojsho could you solve it?

from gravitysnaphelper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.