Android Simple Progress Dialog implementation
Add a progress dialog very simply into your code.
private ProgressDialog mDialog;
mDialog = new ProgressDialog(this); // This being a context, could try getBaseContext() as well
Then, say you want it to show up on a button press. In the buttons listener, put this in (you can adjust the variable numbers later after it works)
mDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
mDialog.setMessage("Gathering Wireless Data...");
mDialog.show();
mDialog.setProgress(0);
mDialog.setMax(60);
Then, if used in conjunction with the thread example from below, put this in when you want to increase the progress bar
mDialog.incrementProgressBy(1);
And then finally, when you want it to go away,
mDialog.dismiss();
ez