ProgressDialog not showing up in activity
I am trying to include a ProgressDialog in my application. But it is not showing up. Here's the code snippet where i use the ProgressDialog: public class abcActivity extends Activity { public boolean onOptionsItemSelected(MenuItem item) { case XYZ: ProgressDialog dialog = ProgressDialog.show(abcActivity.this, "", "Please wait for few seconds...", true); callSomeFunction(); dialog.dismiss(); showToast(getString(R.string.SomeString)); break; } } Does anyone know why the dialog is not showing up? Any clues? I think your code is wrong in a sense that you do all in the UI thread. You have to put