ListView和android中notifydatasetchanged [英] listview and notifydatasetchanged in android

查看:188
本文介绍了ListView和android中notifydatasetchanged的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 CustomListView 的ImageView

当我选择任何条目图像视图的变化。我需要显示在另一个ListView中选定的项目。我通过了文件,我得到了一个线索使用 notifydatasetchanged() ..但问题是我不知道如何使用它或者使用它。

When I select any item the image view changes. I need to display the selected items in another ListView. I went through documents and I got a clue to use notifydatasetchanged()..but problem is I dont know how to use it or where to use it.

推荐答案

实际上 notifydatasetchanged 我们使用了适配器方法不是列表视图

actually notifydatasetchanged method we are using for adapter not for listview.

假设你正在使用BaseAdapter的列表视图为..
所以使用

suppose you are using BaseAdapter for listview.. so use

adaptername.notifydatasetchanged() where your image is changing.

有关更多信息,然后<一个href=\"http://developer.android.com/reference/android/widget/ArrayAdapter.html#notifyDataSetChanged%28%29\"相对=nofollow>点击此处

这篇关于ListView和android中notifydatasetchanged的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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