Android-Dynamic-Expandable-List-Adapter icon indicating copy to clipboard operation
Android-Dynamic-Expandable-List-Adapter copied to clipboard

UI freezes on scroll

Open ishaan-khan opened this issue 5 years ago • 4 comments

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?

ishaan-khan avatar Jun 19 '20 09:06 ishaan-khan

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 avatar Jun 19 '20 10:06 mmobin789

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

mmobin789 avatar Jun 20 '20 16:06 mmobin789

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

NunoPontes avatar Aug 31 '20 16:08 NunoPontes

@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.

mmobin789 avatar Aug 31 '20 20:08 mmobin789