title: Text alignment of progress dialog in Android
body: <p>I am developing an Android app. In my app , I am showing progress dialog. I can show it very easily. But the problem is as in screenshot below.</p>
  
  <p><a href="https://i.stack.imgur.com/PiqRA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PiqRA.png" alt="enter image description here"></a></p>
  
  <p>As you can see above the circle is aligned to left. I want to center it. I searched solutions online. But all solutions are complicated. For example I have to create custom dialog extending dialog class. But I think it is not worth to do it. Besides, I think android has the built in easy way to do it.</p>
  
  <p>This is my code to show dialog:</p>
  
  <pre><code>  public void showLoginLoadingPopUp()
      {
          loadingDialog = new ProgressDialog(this);
          loadingDialog.setTitle("Loading please wait . . .");
          loadingDialog.show();
  
      }
  </code></pre>
  
  <p>As you can see, the code is so simple. I also want simple code to align circle to center of dialog without customizing dialog class.</p>
  
  <p><strong>Example</strong> <code>loadingDialog.setTextAlign(center</code>). </p>
  
  <p>But I cannot find any function to do it. What would be the easiest way to do it ?</p>