Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI freezes on scroll #1

Open
ishaan-khan opened this issue Jun 19, 2020 · 4 comments
Open

UI freezes on scroll #1

ishaan-khan opened this issue Jun 19, 2020 · 4 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@ishaan-khan
Copy link

Hi,
A wonderful attempt at vertically nested Recylcerviews. I had initially developed a similar concept and it had slight lag on scrolling, unfortunately your solution has the same issue.

Do you happen to have a solution for that?

@mmobin789 mmobin789 self-assigned this Jun 19, 2020
@mmobin789 mmobin789 added the good first issue Good for newcomers label Jun 19, 2020
@mmobin789
Copy link
Owner

I just verified your issue when I scrolled the sample app I am fixing it asap subscribe to this repo as when its fixed I will push the code.

@mmobin789 mmobin789 assigned malikdawar and unassigned mmobin789 Jun 20, 2020
@mmobin789
Copy link
Owner

@malikdawar take pull and create your branch and send a PR with above fix asap.

@NunoPontes
Copy link

Hello, any news on when this would be solved? thanks

@mmobin789 mmobin789 assigned mmobin789 and unassigned malikdawar Aug 31, 2020
@mmobin789
Copy link
Owner

@ishaan-khan @NunoPontes can you mention Android API versions you are testing on ? i - e 21,24 etc.

Also mention steps to reproduce lag or any videos pointing it out would be really helpful.

I experience negligible lag in Android 9 (Pie) and 9+.

However expandable adapter should perform smoothly with negligible lag on Android 7 and greater.

I am also trying to fix this but any optimal fix isn't found yet.

Tried what so far:

  1. Using same recycled view pool for parent and child isn't working as when the view is retrieved from the pool a classCastException occurs because sometimes the view requested by parent turns out to be a child and contrary as well. (Failed)

  2. You can initialize the child recycler view adapter in ExpandableRecyclerViewClass in a worker thread however collapse/expand animations are affected which converts to a bad user experience though the lag is gone. (Passed but not graceful)

As of current I am trying to optimize the 2nd approach.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants