title: Android ProgressDialog not showing up
body: <p>Here is the part of my code connected to the dialog. After they press the button, it should show up and after showing up, the it should process the data and when its done, it should hide away. But it doesen't even appear?</p>
  
  <pre><code>ProgressDialog dialog = new ProgressDialog(this);
  dialog.setMessage("Prosimo počakajte da naloži podatke.");
  dialog.setIndeterminate(false);
  dialog.setCancelable(false);
  dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
  
  private Button.OnClickListener listener = new Button.OnClickListener() {
      public void onClick(View v){
          if(selectedClass &gt;= 0){
              dialog.show();
  
              ... data processing ...
  
              Intent firstUpdate = new Intent(context, ConfigurationActivity.class);
              firstUpdate.setAction("android.appwidget.action.APPWIDGET_ENABLED");
              firstUpdate.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, widget_id);
              context.sendBroadcast(firstUpdate);
  
              dialog.dismiss();
              setResult(RESULT_OK, firstUpdate); 
              finish(); 
          } else {
              Log.i("Schedule", "Missing selections");
          }
      }
  };
  </code></pre>
  
  <p>Thanks for any help.</p>