为什么我的列表视图的内容条目未更新文件传输完成后?我的、条目、视图、文件传输

2023-09-04 06:05:48 作者:我宣布你已过期

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

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)