Thanks.

1. Does this still work if the list is empty? The docs don't specify.
2. Is this better than just resetting the adapter?

On Oct 9, 11:27 am, Romain Guy <romain...@google.com> wrote:
> setSelection(0)
>
> On Thu, Oct 8, 2009 at 8:14 PM, westmeadboy <westmead...@yahoo.co.uk> wrote:
>
> > I have a ListView which displays the results of some search.
>
> > When the user makes a new search I repopulate the underlying Array of
> > an ArrayAdapter and call notifyDataSetChanged(). However, if the user
> > has previously scrolled down in the ListView then the scrolling is not
> > then reset to the top - I can see why this is the way it is (to
> > support incremental changes to the contents).
>
> > How to programmatically set the contents to appear at the top of the
> > ListView?
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  All such questions should be posted on
> public forums, where I and others can see and answer them
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to