I'd like to check for an existing file using a while loop. Now the problem is, that if use something like this:
while (file.exists()) {
text.setText("Some text appears");
text.setTextColor(Color.RED);
}
my program always seem to not to respond at all. Is it because my loop is somehow an infinite loop? Or why is is not working correctly.
Right now, i am using a simple if statement
but i don't like it that way, because it is not updated right away when the file exists.
EDIT: What i want is: I offer a file to download. In my app, there is a text which says "Not Available yet". I want to change the text right after the file exists to something like "File is Available".