本文介绍了Android notifyDataSetChanged的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个列表,里面有一个自定义的 ArrayAdapter
.
I have a list which is filled with a custom ArrayAdapter
.
我想每秒更新一个进度条,所以我尝试使用 notifyDataSetChanged()
来重新绘制列表,但它似乎不起作用.
I want to update a progress bar every second, so I am trying to use notifyDataSetChanged()
in order to repaint the list but it doesn't seem to work.
推荐答案
您如何更新为 ArrayAdapter
提供数据的 List
数据结构?
How are you updating the List
data structure that is feeding ArrayAdapter
?
请在此处查看我的回答:notifyDataSetChanged 示例
Please see my answer here: notifyDataSetChanged example
关于 ArrayAdapters
的问题,以及更新保存数据的 List
以便 notifyDataSetChanged
工作.
for issues regarding ArrayAdapters
and updating the List
that holds data for notifyDataSetChanged
to work.
这篇关于Android notifyDataSetChanged的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!