android-pulltorefresh
android-pulltorefresh copied to clipboard
Header Padding Lag
The current way header padding is added, that is, on every move event, is terribly slow and causes lag. The way it works on most other implementations (including the official Android overscroll implementation) is that a header view is added with an extremely large height or padding value, like 10000px. Then, when calculations are done, that value is simply subtracted.
I believe this would be a much better method, rather than calculating and adjusting the required padding on every move event.
Thank you. I haven't though of doing it that way, will start to experiment with this as soon as I can. Until then I believe we can check the state much earlier so we don't go into the reflection parts if we're don't need too.
I haven't experienced that it causes lag on any of the devices I've tested it on yet, but the amount of devices out there and that there might be better alternatives is definitely an argument to investigate this further.
Then, when calculations are done, that value is simply subtracted.
Just curious about this implementation. What do you mean by "when calculations are done". Since you can't override the getTop method of a view, which is what the listview motion handler uses, you are forced to either implement your own custom touch handling or set your own measured dimensions and request layout everytime?
this case is issued 2 years ago and never fixed!!!