Hi Migs, You can try creating custom adapter (subclassing BaseAdapter) backed by an ArrayList. So lets say a new data comes in, get the currently selected index, push your new data to arraylist, call invalidate on your listview then call setSelection(position) on listview.
hth, Marc On Wed, Oct 21, 2009 at 7:34 PM, Miguel Paraz <[email protected]> wrote: > > Hi, > I'd like to build a ListView with streaming content. New items are > added to the top and old ones are forgotten > > If I understand correctly, the ListView was not built for this, right? > The ListAdapter was meant to provide a fixed set of data. > > I tried to setAdapter() when new data comes in, but this makes the > ListView forget the current selection. > > Is it feasible to subclass or modify ListView behavior so that the > selection stays the same but gets pushed down? > > Thanks! > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

