title: How to create a custom Progress Dialog(spinner)?
body: <p><img src="https://i.stack.imgur.com/CqVFW.png" alt="Sorry for the late update..but this is the kind of spinner layout I&#39;m talking about">I have googled a lot and even gone through many of this website questions but I just can't find the solution to my problem.</p>
  
  <p>I want to create a spinner like the one below. This is just a normal spinner I have done till now. I tried a variety of spinner examples but they don't give me my desired result.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>public class nextclass extends Activity {
  
      Thread t;
      ProgressBar dia;
  
      private ProgressDialog progressDialog;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          // TODO Auto-generated method stub
          super.onCreate(savedInstanceState);
          MainActivity.progressDialog.dismiss();
          setContentView(R.layout.nextclassview);
      //  requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
  
          ((Button) findViewById(R.id.button1))
                  .setOnClickListener(new OnClickListener() {
  
                      public void onClick(View v) {
                          // TODO Auto-generated method stub
                          // progressDialog = findViewById(R.id.progressBar1);
  
                          new AuthenticateUserTask().execute();
                      }
                  });
      }
  
      private class AuthenticateUserTask extends AsyncTask&lt;Void, Void, String&gt; {
  
          @Override
          protected void onPreExecute() {
              // TODO Auto-generated method stub
              super.onPreExecute();
  
              progressDialog = ProgressDialog.show(
                      nextclass.this, "","Sucessful", true);
  /*            progressDialog.setIndeterminate(true);
  
              progressDialog.setIndeterminateDrawable(getResources()
                      .getDrawable(R.layout.customspinner));
  */
  
  
              progressDialog = ProgressDialog.show(nextclass.this, "",
                      "Processing....", true);
              progressDialog.getWindow().setLayout(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
  
          }
  
          protected void onPostExecute(String s) {
              if (progressDialog.isShowing())
                  progressDialog.dismiss();
  
              Intent my = new Intent(getApplicationContext(), CountTime.class);
              startActivity(my);
  
          }
  
          @Override
          protected String doInBackground(Void... params) {
              // TODO Auto-generated method stub
              try {
                  Thread.sleep(2000);![custom spinner][2]
              } catch (InterruptedException e) {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
              }
              return null;
          }
      }
  }
  </code></pre>