为什么我的列表视图的内容条目未更新文件传输完成后? [英] Why is the content of my listview entries not updated after the file transfer is completed?

查看:102
本文介绍了为什么我的列表视图的内容条目未更新文件传输完成后?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么这个文件复制到该目录中列表视图后未更新与驻留在该目录中较新的内容?只有当我退出列表视图键,重新输入视图将它被刷新?

Why is it that after copying the file to the directory the listview is not updated with newer content which reside in that directory? Only when I exit the listview and reenter the view will it be refreshed?

谁能告诉我怎样才能解决这个问题?

Can someone tell me how I can solve this problem?

文件功能的java文件复制

Copying of file function java file

推荐答案

您应该添加新复制的文件(VideoInfo对象)到您的ArchiveItems列表,然后你可以调用listview.notifyDataSetChanged()刷新的ListView,似乎你不这样做(但有太多的code看看,也许我错过了一些东西)

You should add the newly copied files (VideoInfo objects) onto your ArchiveItems list, and then you can call listview.notifyDataSetChanged() to refresh the ListView, it seems you're not doing it (but there's too much code to look at maybe I've missed something)

或者你可以重新载入列表视图内容后,你的任务已经完成了应对新的项目(与loadVideoFiles()或其他)

or you can just reload the listview contents after your task has finished coping the new items (with loadVideoFiles() or whatever)

这篇关于为什么我的列表视图的内容条目未更新文件传输完成后?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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