2 Answers
2

You can do it by the following way
The key to use progress bar is using “Thread” to run your time consume task and another “Thread” to update the progress bar status accordingly. Read the code’s comment, it should be self-explanatory.