October 2018
Intermediate to advanced
464 pages
15h 17m
English
We used the default ProgressDialog settings for this recipe, which creates an indeterminate dialog indicator, for example, the continuously spinning circle. If you can measure the task at hand, such as loading files, you can use a determinate style instead. Add and run this line of code:
mDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
With STYLE_HORIZONTAL, you'll see the percentage dialog shown here:
