Android - Render Changes to View Before Running More Code -


My app starts by downloading several files from the Internet I want to display a line of text that "download files "Says while saying this is downloading. The problem is that the view is not updated until all the code runs, so textview is not displayed. I have tried to run the code and files for the text view, and invalid and post inventant on the mallayoutview object between the code, and it does not seem to have any effect. What am I missing?

You need to download it to a different thread. It is compulsory for several reasons: if your download The code takes up to 5 seconds, then Android will report your application as unresponsive and it will crash, and you will not be able to update the user interface

Doing it, dozens of Examples are you can use async Task, but also one Grade object, or a Rnnbl ... See this link for a great example:


Comments