Android: progress bar is displayed

I want to display a progress indicator, and during this time it will receive the elements, and when it finishes receiving all the elements, it will display a list.

How is this possible?

0
android progress-bar
source share
3 answers

How to implement AsyncTask implementation using ProgressDialog as a member?

http://developer.android.com/reference/android/os/AsyncTask.html http://developer.android.com/reference/android/app/ProgressDialog.html

See the article.

0
source share

Progress dialog will not be displayed with async task

This is a question that I posted that contains most of the sample code that you will need to get a progress bar

basically it is launching a second tread that will do what you need (in this case, it loaded the SQL database for my application), leaving the UI thread executing it (showing the progress dialog)

0
source share
  • Create a ProgressDialog in Activity :

     private ProgressDialog progressDialog; 
  • Set ProgressDialog in any action you want to spend some time in:

     progressDialog = ProgressDialog.show(FoodDriveModule.this, "", "Loading..."); 
  • Use Thread to process the progress bar:

     new Thread() { public void run() { try { sleep(1500); // do some task (whatever you want to do) } catch(Exception e) { Log.e("tag",e.getMessage()); } }.start(); } 
0
source share

All Articles