title: How to set custom layout to progress dialog background?
body: <p>Question in the title) Help me, please)
  I want to make from this
  <a href="https://i.stack.imgur.com/2RQgJ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2RQgJ.jpg" alt="enter image description here"></a></p>
  
  <p>that </p>
  
  <p><a href="https://i.stack.imgur.com/vkRoZ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vkRoZ.jpg" alt="enter image description here"></a></p>
  
  <p>I tried implement it's.</p>
  
  <pre><code>mProgressDialog = new ProgressDialog(this);
  mProgressDialog.getWindow().setContentView(R.layout.footcloth);
  mProgressDialog.setMessage(Constants.PROGRESS_DIALOG_MESSAGE);
  mProgressDialog.show();
  </code></pre>
  
  <p>But this code throwing exception</p>
  
  <pre><code>java.lang.RuntimeException: Unable to start activity ComponentInfo{im.anticafe.anticafeim/im.anticafe.anticafeim.activities.HomeActivity}: android.util.AndroidRuntimeException: requestFeature() must be called before adding content
  </code></pre>
  
  <p>This code implements in activity BottomBarActivity </p>
  
  <pre><code>abstract public class BottomBarActivity extends AppCompatActivity implements View.OnClickListener {
  
      private static final String TAG = "bottomBarActivity";
      private int mWidth;
      private ProgressDialog mProgressDialog;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          ...
          mProgressDialog = new ProgressDialog(this);
          mProgressDialog.getWindow().setContentView(R.layout.footcloth);
          mProgressDialog.setMessage(Constants.PROGRESS_DIALOG_MESSAGE);
          mProgressDialog.show();
          ...
      }
  
      ...
  }
  </code></pre>
  
  <p>And this activity are extending in others. 
  So, help me solve my problem, please)
  Thanks)</p>