刷新视图的Android [英] Refresh a view Android
本文介绍了刷新视图的Android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想刷新列表视图。当我收到来自不同类的值,我希望它更新到列表视图。我创建一个线程刷新列表,但我得到一个异常:
I want to refresh a listview. When I am getting a value from different class I want it to update that to list view. I am creating a thread for refreshing the list but I am getting an exception:
只有创建一个线程原始线程一个视图层次可以触摸自己的看法
如何进行呢?
推荐答案
而不是试图刷新视图以更新列表只是把适配器对象和调用notifyDataSetChanged()API。
Instead of trying to refresh the view to update the list just take the Adapter object and call the notifyDataSetChanged() API.
这篇关于刷新视图的Android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文