O'Reilly logo

Android Fragments by Satya Komatineni, Dave MacLean

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter    6

Advanced AsyncTask and Progress Dialogs

In many Android applications, you will need to perform work behind the UI in a separate thread. While the work is going on, you might want to display some sort of progress indicator to the user. While it is possible to create your own threads, manage them, and coordinate UI updates from your thread, Android provides a couple of classes that take care of a lot of this for you automatically. Then you can focus on the actual work that you want to do, instead of the code for threads and messaging to the UI. The classes that do this are AsyncTask and ProgressDialog.

This chapter will start with the basics of an AsyncTask and move to the code needed to present progress dialogs and progress bars that ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required