Giter Site home page Giter Site logo

Comments (5)

JDevZone avatar JDevZone commented on May 23, 2024

Hi @developerGM, can you please explain a bit more about the problems that you're facing so that we can get the context properly . If you have any general problem in recycler-view then you can visit this stack link to improve overall performance.

from fillprogresslayout.

developerGM avatar developerGM commented on May 23, 2024

Hi @JDevZone, thanks for your reply.
My problem is not recyclerview performance.

I am a recyclerview with 10 items...Each item has FillProgressLayout inside as a child view. With a long press on item I am trying to start FillProgressLayout using .progress(100, true) using so the animation.

This is my use case:

  • Click long press on 1° item -> start animation
  • Click long press on 2° item -> start animation
  • Scroll quickly on bottom of list and click on the last 2 items (9° and 10°) -> start animations
  • When I scroll quickly on the top...the item 1° has the animation of 10° item because of course the view is recycled.

How can I solve this problem?
Hope the description is more clear now

from fillprogresslayout.

JDevZone avatar JDevZone commented on May 23, 2024

Hi @developerGM , this isn't a view specific issue as you can see here. Animations are unable to survive after view recycling. But still in v0.07 animator is exposed for these kind of situations. A sample is attached as described on stack, hope it can help you out.

FillRecycle.zip

from fillprogresslayout.

developerGM avatar developerGM commented on May 23, 2024

Thanks @JDevZone to expose animator, this is a very good first step.
In your example if I start progress on item 1...than scroll down and scroll up....item 1 is stopped on the last progress position.
Item 1 should never stop progress.

In my app, these items are some IOT device...on long press I start animation to show to user that physical device is running for 10secs.
So, when start item1 start animation for 10secs...and than scroll down and up, my user should see the progress animation always active if 10secs not endend.

from fillprogresslayout.

JDevZone avatar JDevZone commented on May 23, 2024

Okay @developerGM, then you have to retain the views with their respective state means no recycling of views. But this will significantly affect the performance or can even leads to OOM. You can give it a shot for small number of items but as said earlier this defeats the purpose of recycler-view. You can have a look here to do so.

from fillprogresslayout.

Related Issues (9)

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.