Updating progress dialog

前端 未结 2 1534
轻奢々
轻奢々 2021-01-21 04:19

I am trying to make an application that can help me to evaluate the time to download the file from a web resource. I have found 2 samples:

Download a file with Android,

2条回答
  •  温柔的废话
    2021-01-21 05:01

    The second example may run faster, but it monopolizes the GUI thread. The first approach, using AsyncTask, is better; it allows the GUI to stay responsive as the download proceeds.

    I found it helpful to compare AsyncTask with SwingWorker, as shown in this example.

提交回复
热议问题