title: How to change progress dialog box size in android?
body: <p>I used this method to create progress dialog box.</p>
  
  <p>But it not fit with the screen size. I want to minimize size of this progress dialog box. </p>
  
  <p>This is the (AsyncTask) code i used:</p>
  
  <pre><code>ProgressDialog myPd_bar;
  
  @Override
          protected void onPreExecute() {
              // TODO Auto-generated method stub
  
              myPd_bar=new ProgressDialog(AppleModles.this);
                //myPd_bar.setMessage("Loading....");
                myPd_bar.setTitle("Please Wait..");
                myPd_bar.setProgressStyle(myPd_bar.STYLE_HORIZONTAL);
                myPd_bar.setProgress(0);
                myPd_bar.setMax(30);
                myPd_bar.show();
                new Thread(new Runnable() {
                     @Override
                      public void run() {
                            // TODO Auto-generated method stub
                            try
                            {
                                  while(myPd_bar.getProgress()&lt;=myPd_bar.getMax())
                                  {
                                      Thread.sleep(1000);
                                      handle.sendMessage(handle.obtainMessage());
                                        if(myPd_bar.getProgress()==myPd_bar.getMax())
                                        {
                                              myPd_bar.dismiss();
                                        }
  
                                  }
                            }catch(Exception e){}
                      }
                }).start();
  
  
              super.onPreExecute();
          }
  
  Handler handle=new Handler(){
                    @Override
                    public void handleMessage(Message msg) {
                          // TODO Auto-generated method stub
                          super.handleMessage(msg);
                          myPd_bar.incrementProgressBy(5);
                    }
              };
  </code></pre>
  
  <p>Can anyone help me to minimize this progress dialog box size? </p>