johannilsson/android-pulltorefresh

Weird comportement in android 2.2

ToYonos opened this issue · 7 comments

The list comports itself weirdly the first time it is loaded.
Without scrolling, I tapped anywhere in the list and some elements kinda dissapeared and reappeared, so do the header. I scrolled a little the list and everything went back to normal.

How I fix it ? It took me hours but I have finally sorted it out : I removed the onAttachedToWindow method in the PullToRefreshListView class.

Is it the same in other android version ? I don't know, I haven't push my investigation any further.

Hi, thank you for the report. Sorry for being lazy here but can this be reproduced in the example app as well?

You could also try the scrollfix_for_short_list which initializes itself a little bit different.

Yes, I tried the example app, without any modification, and the bug still appeared.

Actually, I don't really know if it's linked to the android version. Anyway, this trick works for me :)

Thank you for testing, will have a look at it and see if we can remove onAttachedToWindow.

And thank you for the lib

try to add a line in onAttachedToWindow:

super.onAttachedToWindow();

it's work fine to me with 2.2. :-)

@since2006 you're right that should be there, good catch.

@since2006 I tried this already and it didn't work at all.

Removing the overrided method was the only solution for me. (onAttachedToWindow() is still called but from the ListView class)