notifyDataSetChanged()的事件 [英] The event of notifyDataSetChanged()

查看:162
本文介绍了notifyDataSetChanged()的事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有类Myadapter扩展BaseAdapter.in Myadapter我改变了MyListView数据然后调用notifyDataSetChanged()方法,如删除项目(点击一个ListView项按钮),它的工作原理perfect.but我们如何能刷新视图,除了列表视图中的活动。尤其是我可以得到一些事件,当notifyDataSetChanged()被调用?那么,我们可以通知UI线程更新。

I have class Myadapter extends BaseAdapter.in Myadapter i changed the MyListView data then call notifyDataSetChanged() method,like remove an item(click button on a listview item),it works perfect.but how can we refresh the view that except listview in Activity. especially can i get some event when notifyDataSetChanged() is called?then we can notify ui thread to update.

推荐答案

我觉得你可以手动执行此操作:

I think you can do this manually:

myAdapter.notifyDataSetChanged();
callCustomMethod(); // Updates custom view

这篇关于notifyDataSetChanged()的事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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