It looks like setting the scroll position in a RemoteViews object is broken in ways other than the timing issue mentioned above. Let's say I have a count of 80 items in the listview, and I have manually (with finger) scrolled down to the bottom of the list (item 79). At that point, calling remoteViews.setScrollPosition(0) will not cause the list to make item 0 in the list visible. Instead it will make item 60 visible in the list. It seems to me that RemoteViews has a cache of about 20 elements or so elements that it has obtained from the RemoteViewsFactory, and when you set the scroll position to an index, it's using that index relative to it's internal cache, NOT as an absolute position in the entire list. So setting the scroll position to index 0 only works if the listview is currently showing items between 0 and 20. Ughh.
Anyway, if anybody has any thoughts on this, I'd like to hear them, but at this point it sounds like I just need to open a bug report on these new peculiarities in API 11. Thanks, Don On Apr 13, 1:46 pm, Don <[email protected]> wrote: > How can I set the initial scroll position in a scrollable widget? > Calls to remoteViews.setScrollPosition followed by > appWidgetManager.partiallyUpdateAppWidget do not seem to work until > some point after at least some of the data has been queried via my > RemoteViewsService.RemoteViewsFactory implementation. Perhaps the app > widget manager has to have some list data prior to being able to set > the index, but this seemingly makes it impossible to set the scroll > position immediately after the widget is created. I'd think I could > tell the AppWidgetManager the initial position in the list and it > would start it's querying for data at that position. > > Any pointers would be much appreciated. > > Thanks, > Don -- 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

