Giter VIP home page Giter VIP logo

Comments (9)

rubensousa avatar rubensousa commented on June 11, 2024

Every element or just a particular one?

from gravitysnaphelper.

jeffbordon avatar jeffbordon commented on June 11, 2024

Happens to me with every element...

from gravitysnaphelper.

rubensousa avatar rubensousa commented on June 11, 2024

Which gravity are you using? Are you saying it works without padding?

from gravitysnaphelper.

jeffbordon avatar jeffbordon commented on June 11, 2024

Without padding and clipToPadding=false it works, however I would like the padding... Here is my full layout (the overscroll-param does not change the behavior):

<LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical"
 >

<RecyclerView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:overScrollMode="never"
            android:padding="8dp"
            android:clipToPadding="false"
            android:orientation="horizontal" />
</LinearLayout>

from gravitysnaphelper.

rubensousa avatar rubensousa commented on June 11, 2024

The outer LinearLayout isn't necessary in that case. Try removing it or applying clipToPadding to it as well.
Also, recyclerview doesn't handle "android:orientation"

from gravitysnaphelper.

jeffbordon avatar jeffbordon commented on June 11, 2024

Thanks for the response. I finally found that clipToPadding="false" was not the problem.

The root cause for my problem seems to be that I have my snapping RecyclerView inside a vertically scrolling RecyclerView on which I apply
((SimpleItemAnimator) mRecyclerView.getItemAnimator()).setSupportsChangeAnimations(false);
to disable layout transitions (to avoid the flickering effect on click).

Then I re-enable the layout transitions only for the LinearLayout (the one above you recommended to remove) holding my snapping RecyclerView by calling
mLinearLayout.setLayoutTransition(new LayoutTransition());

Still investigation this issue...

from gravitysnaphelper.

rubensousa avatar rubensousa commented on June 11, 2024

Can you provide sample, through a github repository or just a zip file?

What changes are you introducing on click that add a flickering effect? I think you're disabling layout transitions the wrong way though. If you want to disable them in that LinearLayout, you should pass null in setLayoutTransition instead of changing RecyclerView's ItemAnimator.

from gravitysnaphelper.

rubensousa avatar rubensousa commented on June 11, 2024

Any updates?

from gravitysnaphelper.

rubensousa avatar rubensousa commented on June 11, 2024

Closing due to no response.

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.