Why is the content of my list entries not updated after the file transfer is complete?

Why after copying a file to the listview directory does not update the newer content that is in this directory? Only when I exit listview and return to the view, will it be updated?

Can someone tell me how can I solve this problem?

Copy file function java file

0
source share
1 answer

You must add the newly copied files (VideoInfo objects) to your ArchiveItems list, and then you can call listview.notifyDataSetChanged () to update the ListView, it seems that you are not doing this (but there is too much code to view it, maybe I I missed it)

or you can just reload the contents of the list after your task has finished working with new elements (using loadVideoFiles () or something else)

+2
source

Source: https://habr.com/ru/post/898975/


All Articles