安卓的ListView ArrayAdapter数据更新的最佳做法 [英] Android ListView ArrayAdapter data updates Best Practices

查看:845
本文介绍了安卓的ListView ArrayAdapter数据更新的最佳做法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个正在不断接受新的价值观形成套接字线程多列表视图的活动,另一个线程解析数据,并更新阵列适配器,那么UI线程调用notifyDataSetChanged(),使该列表刷新。

I have an activity with multiple list views that are continuously receiving new values form a socket thread, another thread parses the data and updates the array adapters, then the ui thread calls notifyDataSetChanged() to cause the list to refresh.

我的问题是,即时通讯清爽所有列表几个第二时间,这将导致用户界面是非常laggy当一些动画需要发生

My issue is that im refreshing all the list a couple of time a second, this causes the UI to be very laggy when some animations need to happen.

我在想,最好的办法是更新多个列表有多个值每秒都会更改了什么?

I was wondering what the best way is to update multiple lists with multiple value changes every second?

谢谢,   图腾。

推荐答案

我肯定会跟着他们在谷歌IO今年给了指引。

I would definately follow the guidelines they gave at Google IO this year.

谷歌IO列表视图视频

这篇关于安卓的ListView ArrayAdapter数据更新的最佳做法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆