如何更新可扩展列表视图值
您好,我在布局中使用可扩展列表视图,其中包含我在特定日期完成的健身活动列表。当我最初打开我的活动时,我可以看到所有活动列表。但是当我添加新活动时,我在可扩展列表视图中看不到新活动。当我从其他屏幕回来时,如何才能看到我的新活动?请给我建议一些解决方案。
提前致谢。
Hi I am using expandable list view in my layout which contain list of fitness activities i have done on that particular day. I can see all the list of activities when i initially open my Activity. But when i add new activities, i can not see new activities in my expandable list view. How can i see my new activities when i come back from other screens? Please suggest me some solutions.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一种简单的方法是添加活动后,再次将适配器与列表视图绑定。确保使用适配器与列表视图绑定的任何数组在添加活动后都会得到更新。
One easy way is that after adding activity, bind the adapter again with your listview. Make sure whatever array, you bind with list view using adapter, gets updated after you add activity.