I have run into the same thing in 1.6 in that sometimes
notifyDataSetInvalidated sends the list back to the top and sometimes
it does not. Here is a block of code that seems to work (at least it
has not "not worked" yet in testing).

lViewAdapter.notifyDataSetInvalidated(); // New data, this does not
depenably set the list back to the top
lView.setSelectionFromTop(0,0); // This seems to help the list get
back to the top

Of course lViewAdapter is the adapter attached to lView.


On Dec 6, 2:50 pm, ggcespia <g...@boopsie.com> wrote:
> Hello - does anyone have a work around for this 'new' behavior.  The
> idea would be to reset the scroll position like
> notifyDataSetInvalidated() used to do...
>
> On Nov 23, 6:02 pm, ggcespia <g...@boopsie.com> wrote:
>
> > In the 1.5 OS, the notifyDataSetInvalidated() not only invalidated the
> > data source, but also reset the scroll position to the 'top' of the
> >listview- so if you then called notifyDataSetChanged(), theListView
> > redrew with the new data *and* positioned thelistviewat the top.
> > On the DROID in OS 2.0, this behaves differently, the
> > notifyDataSetInvalidated() does *not* reset the scroll position.  I
> > need it to reset the scroll position...like it used to.   Any ideas
> > how to reset the scroll position?
>
>

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

Reply via email to