title: Changing default progress wheel inside ProgressDialog with animated gif
body: <p>I'm trying to set an animated gif as the spinner of a ProgressDialog.
  I've tried to follow this post without solving the problem (the spinner simply disappear when it starts the dialog) : </p>
  
  <blockquote>
    <p><a href="https://stackoverflow.com/a/25508430/6030866">https://stackoverflow.com/a/25508430/6030866</a></p>
  </blockquote>
  
  <p>Please, help me.</p>
  
  <p>Here's my code :</p>
  
  <pre><code>@Override
      protected void onPreExecute() {
          super.onPreExecute();
          pDialog = new ProgressDialog(LoansList.this);
          pDialog.setMessage("Loading books. Please wait...");
          pDialog.setIndeterminate(true);
          pDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
          pDialog.setCancelable(false);
          Drawable d = getResources().getDrawable(R.drawable.bookgif);
          pDialog.setIndeterminateDrawable(d);
          pDialog.show();
      }
  </code></pre>
  
  <p>In this way i can only view the single image (not animated).
  Please , help me.
  I'm using the latest version of Android Studio.</p>
  
  <p>Thank you very much !</p>