GithubHelp home page GithubHelp logo

Data change animations about superslim HOT 8 CLOSED

tonicartos avatar tonicartos commented on July 18, 2024
Data change animations

from superslim.

Comments (8)

TonicArtos avatar TonicArtos commented on July 18, 2024

Will require support from SLMs.

from superslim.

kingargyle avatar kingargyle commented on July 18, 2024

So I take it right now the Layout Managers for 0.4.x do not support animations?

from superslim.

TonicArtos avatar TonicArtos commented on July 18, 2024

Some things work from notify data set changed with one of the recent recycler view updates. I am working on this for 0.5, right now in fact.

from superslim.

usernotnull avatar usernotnull commented on July 18, 2024

I added an ItemAnimator for my recyclerview.
It seems that animations don't work as intended if used with SLM since each row needs to be recalculated, am I correct? The only one that made sense was notifyDataSetChanged(). Not as smooth smooth as one wants but waiting for a better solution.

from superslim.

DennyWeinberg avatar DennyWeinberg commented on July 18, 2024

Currently I am trying to get smooth UI updates done using Androids DiffUtil: https://android.jlelse.eu/smart-way-to-update-recyclerview-using-diffutil-345941a160e0

It works not so bad, but when I try to remove items with the header at the same time, it crashes.

I have to try a bit more, maybe I can get it working.
As you said, we need to recalculate the sectionFirstPosition of all items. In general this is no problem because we can use onBindViewHolder payloads in order to refresh only a part.

from superslim.

TonicArtos avatar TonicArtos commented on July 18, 2024

I am surprised you got it working as well as that.

from superslim.

DennyWeinberg avatar DennyWeinberg commented on July 18, 2024

I didn't worked 100%. Maybe 70% or something. But it should be possible for most of the cases with some more time. But I would say that it's the work of the library and not of the user, so I stopped my Tests after many crashes... :)

from superslim.

TonicArtos avatar TonicArtos commented on July 18, 2024

I completely understand. I have had to hack around things for a long time too. I am partially using the new version now, and I don't have any problems with animations there. I just have to finish implementing the grid layout.

from superslim.

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.