tjerkw / Android-SlideExpandableListView

A better ExpandableListView, with animated expandable views for each list item
Apache License 2.0
1.98k stars 741 forks source link

Replaced OnPreDraw with measure to fix slow List Scrolling and overall smoothness #14

Closed JesseFarebro closed 11 years ago

JesseFarebro commented 11 years ago

I deduced that my slow list scrolling was due to OnPreDraw having to be called when you scrolled through the list the first time before the listener was removed. Since we already have the parent view with the correct dimensions in enableFor() we can just do a measurement call to find out the height of our hidden view and add it to the stack. This removes the overhead from OnPreDraw and still keeps the Min API Level at 1.

tjerkw commented 11 years ago

I just tested this okay! Works like a charm! Scrolling is indeed much faster now. Thanks a lot!