But when I refresh the listview with setlistadapter(listadapter) it returns
to the top.

Mark:
Do you have any article/tutorial about the placeholder images to share? I'm
trying to find one with no luck.

Thanks for helping.


Ivan Soto Fernandez
Web Developer
http://ivansotof.com



On Mon, Mar 23, 2009 at 7:38 PM, Romain Guy <[email protected]> wrote:

>
> ListView does not use scrollY. There's no need to save the scroll
> anyway because ListView does it for you.
>
> On Mon, Mar 23, 2009 at 6:26 PM, Ivan Soto <[email protected]> wrote:
> > Hi,
> > I'm trying to get the scroll position on a ListActivity. Here is what I'm
> > trying to do:
> > I have a list activity that is populated from an XML file. Another thread
> > downloads all pictures so the user can see the list while the thread is
> > still downloading the files.
> > What I'm trying to do is when the thread finishes getting all pics it
> reads
> > the listview scroll position, refresh the listview and scroll to that
> > position again.
> > ListView main = getListView(); <-- not sure if I'm really getting the
> > ListView this way.
> > int scY = main.getScrollY();
> > Log.d("Scroll", scY + " ");  <--- this is printing zero even when at the
> > moment I run this I already scrolled the list.
> > setListAdapter(listadapter);
> > main.scrollTo(0, scY);
> >
> > Any ideas?
> > Thanks!
> >
> > Ivan Soto Fernandez
> > Web Developer
> > http://ivansotof.com
> >
> >
> > >
> >
>
>
>
> --
> Romain Guy
> Android framework engineer
> [email protected]
>
> 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 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