title: android loader not showing in dialog box
body: <p>I am processing an image with a dedicated library. This happens after an alert dialog box is showed up and then when <code>positive/ok</code> is clicked the image is processed. This processing can be long so I try to show up some loader. So I tried this : </p>
  
  <pre><code>setPositiveButton(getResources().getString(...), new DialogInterface.OnClickListener() {
                      @Override
                      public void onClick(DialogInterface dialog, int id) {
                          Activity activity = getActivity();
                          ProgressDialog pd = ProgressDialog.show(activity, "Process", "Searching...", true, false);
                          ImageView image = (ImageView) activity.findViewById(...);
  
                          try {
                              process_image
                          } catch (Exception e) {
                              //some thing
                          }
                          // some code
                          pd.dismiss();
  </code></pre>
  
  <p>but the loader is not showing. I also tried with <code>activity.findViewById(R.id.loadingPanel).setVisibility(View.VISIBLE);
  </code> and it didn't work either. Someone has an idea ? </p>