20.01.2011 13:08, Kwisatz пишет:
I use the getFirstVisiblePosition() and the setSelection() to
workaround this, although it's ugly because the ListView always shifts
a little. But even these are buggy and sometimes (about 5% of the
times) the getFirstVisiblePosition() returns 0. This just adds to the
frustration.


Have you tried saving / restoring scroll position using pixels, rather than the first visible list item?

When you're leaving ListView, there can be a partially visible list item at the top, hence the shifting when you come back to the activity.

I'd try these View methods:

public final int getScrollY ()
public void scrollTo (int x, int y)

--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to