There is a great use for the y scroll position if you are making your own 
creative animated layouts; please expose the scroll position as it is 
exposed in scrollview.

On Monday, March 23, 2009 9:38:59 PM UTC-4, Romain Guy 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