I am trying to update the ListView with periodic updates taken from an HTTP response. Now, 开发者_JS百科I am thinking that because this is very specific to my application, I can get away by using a background thread and then updating the ListView using the magic UI thread. The last time I tried this, I had to remove the entire adapter of the ListView and then fill it up again so it worked. But this time, what I am trying to do is a more "smooth" scrolling ListView... something like a scrolling ticker... Is there a different approach to achieve this?
That depends on the Adapter
. If you are using an ArrayAdapter
, you can call add()
on the ArrayAdapter
itself to add items on the fly.
精彩评论